Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Cannot load module on PowerShell Core 6.2.3 on Ubuntu #22

Open
sba923 opened this issue Dec 24, 2019 · 3 comments
Open

Cannot load module on PowerShell Core 6.2.3 on Ubuntu #22

sba923 opened this issue Dec 24, 2019 · 3 comments

Comments

@sba923
Copy link

sba923 commented Dec 24, 2019

This should speak for itself:

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.2.3
PSEdition                      Core
GitCommitId                    6.2.3
OS                             Linux 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

> import-module -Verbose PSColor
VERBOSE: Skipping the Version folder 1.0.0.0 under Module /home/sto/.local/share/powershell/Modules/PSColor as it does not have a valid module manifest file.
import-module : The specified module 'PSColor' was not loaded because no valid module file was found in any module directory.
At line:1 char:1
+ import-module -Verbose PSColor
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ResourceUnavailable: (PSColor:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

> ls -l /home/sto/.local/share/powershell/Modules/PSColor/1.0.0.0/
total 48
-rw-rw-r-- 1 sto sto  2879 Mar  2  2016 FileInfo.ps1
-rw-rw-r-- 1 sto sto   560 Mar  2  2016 MatchInfo.ps1
-rw-rw-r-- 1 sto sto  1065 Mar  2  2016 ProcessInfo.ps1
-rw-rw-r-- 1 sto sto 11259 Mar  2  2016 PSColorHelper.ps1
-rw-rw-r-- 1 sto sto  5306 Mar  2  2016 PsColor.psd1
-rw-rw-r-- 1 sto sto  1702 Mar  2  2016 PSColor.psm1
-rw-rw-r-- 1 sto sto  6174 Dec 24 09:53 PSGetModuleInfo.xml
-rw-rw-r-- 1 sto sto   960 Mar  2  2016 ServiceController.ps1

@emptyother
Copy link

Just in case it doesnt speak for itself; the file PsColor.psd1 has a lowercase s and renaming the file to PSColor.psd1 fixes it.

@sba923
Copy link
Author

sba923 commented Jan 5, 2020

Indeed! Shame on me for not detecting that when pasting the ls -l output...

At least, the fix to be included in the next release is an easy one. I might even try to find some bandwidth to create the corresponding PR...

@rapha8l
Copy link

rapha8l commented Dec 9, 2021

I run into the same problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants