mandiant / mandiant/commando-vm
The specified module 'C:\ProgramData\_VM\vm.common\vm.common.psm1' was not loaded
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 7.8k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with install.ps1 at the Import-Module call and inspect the source strings used by choco sources add and Set-BoxstarterConfig. Remove the standalone '.' from the affected source lists, then rerun choco source list and choco install vm.common to confirm the source parses and the module installs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100