Skip to content

The specified module 'C:\ProgramData\_VM\vm.common\vm.common.psm1' was not loaded #334

Description

@dromerolovo

Chocolatey source parsing problem causes vm.common installation failure

Import-Module : The specified module 'C:\ProgramData\_VM\vm.common\vm.common.psm1' was not loaded because no valid
module file was found in any module directory.
At Z:\install.ps1:1438 char:9
+         Import-Module "$Env:ProgramData\_VM\vm.common\vm.common.psm1" ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (C:\ProgramData\...\vm.common.psm1:String) [Import-Module], FileNot
   FoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
PS Z:\> choco install vm.common -y
Chocolatey v2.7.1
3 validations performed. 2 success(es), 1 warning(s), and 0 error(s).

Validation Warnings:
 - A pending system reboot request has been detected, however, this is
   being ignored due to the current Chocolatey configuration.  If you
   want to halt when this occurs, then either set the global feature
   using:
     choco feature enable --name="exitOnRebootDetected"
   or pass the option --exit-when-reboot-detected.

Installing the following packages:
vm.common
By installing, you accept licenses for the packages.

Chocolatey installed 0/0 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Source '.' is unable to be parsed
PS Z:\>
PS Z:\> choco source list
Chocolatey v2.7.1
3 validations performed. 2 success(es), 1 warning(s), and 0 error(s).

Validation Warnings:
 - A pending system reboot request has been detected, however, this is
   being ignored due to the current command 'source' being used.
   It is recommended that you reboot at your earliest convenience.

chocolatey - https://community.chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
vm-packages - C:\Users\commando\Desktop;.;https://www.myget.org/F/vm-packages/api/v2;https://chocolatey.org/api/v2 | Priority 1|Bypass Proxy - False|Self-Service - False|Admin Only - False.

The workaround is to change the line

choco sources add -n="vm-packages" -s "$env:USERPROFILE\Desktop;.;https://www.myget.org/F/vm-packages/api/v2;https://chocolatey.org/api/v2" --priority 1 To something like choco sources add -n="vm-packages" -s "https://www.myget.org/F/vm-packages/api/v2" --priority 1 . I think that removing only the "." will work

Seems that the same problem is happening with

Set-BoxstarterConfig -NugetSources "$env:USERPROFILE\Desktop;.;https://www.myget.org/F/vm-packages/api/v2;https://chocolatey.org/api/v2" I changed it to Set-BoxstarterConfig -NugetSources "$env:USERPROFILE\Desktop;https://www.myget.org/F/vm-packages/api/v2;https://chocolatey.org/api/v2" (Removed the '.') and it worked

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions