chocolatey / cChoco

Community resource to manage Chocolatey
Apache License 2.0
154 stars 99 forks source link

Unable to use cChoco #154

Closed ubidev closed 3 years ago

ubidev commented 3 years ago

Describe the bug Once installed I get errors on Import-Module and no cChoco DSC Resources are installed

To Reproduce Steps to reproduce the behavior:

  1. Install-Module cChoco -Scope CurrentUser
  2. Files are installed in $env:USERPROFILE\WindowsPowerShell\Modules\cChoco\2.5.0\
  3. Get-DSCResource returns all resources EXCEPT the cChoco ones
  4. Import-Module cChoco returns error: Import-Module : The specified module 'cChoco' was not loaded because no valid module file was found in any module directory.

Expected behavior no error and list of cChoco DSC Resources

Software (please complete the following information): PS U:> $PSVersionTable

Name Value


PSVersion 5.1.19041.610 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.610 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

Additional context Only WIndows, Office 2019 installed on this test VM, latest updates applied I use posh-git and sqlserver modules on the same machine without issues

I am available to provide any additionnal information or assistance.

Thanks in advance ubidev

ubidev commented 3 years ago

I have identified the suspect: The Sonatype nuget proxy I use as a PSProvider instead of the default. Unregistering it then registering the default PSProvider fixed the issue.

I will investigate and report back to share my findings so it can help anyone else using this otherwise fine repo proxy :)

ubidev commented 3 years ago

I was able to completely fix the issue by upgrading my sonatype nexus installation to the latest one. Have a great, whatever you're doing right now ;-)