You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
Install-Module is not making module importable on non-Windows systems #485
Module is imported into session. This is working fine on Windows machines (both Windows PowerShell or PowerShell Core). It is not working fine on Linux (error in next section).
Actual behavior
Import-Module : The specified module 'FIFA2018' was not loaded because
no valid module file was found in any module directory.
Initial investigation
Root cause for this behaviour seems to be case-sensitive search in Linux.
Module is having name with all capital letters FIFA2018 - both psm1 and psd1. However, it is getting saved to directory that has small letters fifa2018. Thus, Windows finds it, and Linux does not.
For this one module, problem can be resolved by renaming it in PS Gallery (how?).
I am more reporting inconsistency between PowerShellGet and built-in PowerShell commands. If Install-Module finds module with some name, it should save it with that exact name.
Interesting is that Get-InstalledModule will find it, but Get-Module -ListAvailable will not.
Check against PS Gallery
Aboput 4% of modules in PS Gallery would have similar problems. It is impacting even some high class modules like AzureRM.profile / AzureRM.Profile.
Click to expand Environment data
Environment data
>$PSVersionTable
Name Value
---------
PSVersion 6.2.1
PSEdition Core
GitCommitId 6.2.1
OS Linux 4.15.0-1036-azure #38~16.04.1-Ubuntu SMP Fri Dec 7 03:21:52 UTC 2018
Platform Unix
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
>Get-Module-ListAvailable PowerShellGet,PackageManagement
Directory: /usr/local/share/powershell/Modules
ModuleType Version Name PSEdition ExportedCommands
----------------------------------------------
Script 1.4 PackageManagement Desk {Find-Package,Get-Package,Get-PackageProvider,Get-PackageSource…}
Script 2.1.4 PowerShellGet Desk {Find-Command,Find-DSCResource,Find-Module,Find-RoleCapability…}
Directory: /opt/microsoft/powershell/6/Modules
ModuleType Version Name PSEdition ExportedCommands
----------------------------------------------
Script 1.3.2 PackageManagement Desk {Find-Package,Get-Package,Get-PackageProvider,Get-PackageSource…}
Script 2.1.3 PowerShellGet Desk {Find-Command,Find-DSCResource,Find-Module,Find-RoleCapability…}
Activity
edyoung commentedon May 24, 2019
Looks like a dup of #472. Thanks for the additional details!
iricigor commentedon May 24, 2019
Thanks Edwin Young (@edyoung). You are right, its duplicate. I searched for similar things, but I could not find it. I will add my details there.
SydneyhSmith commentedon May 24, 2019
Closing as a duplicate, thanks Igor (@iricigor)