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 }}
Repository navigation
Install-PSResource fails with ExternalModuleDependencies #1809
Hi Thomas Nieto (@ThomasNieto) my apologies for the delay in triaging this! Looking at AnyPackage.Appxmodule manifest it appears you've got Appx listed under RequiredModules and under ExternalModuleDependencies. PowerShell and PSResourceGet expect a dependency module to be listed under either manifest element not both. (ie it won't detect it in both and then exclude it from RequiredModules because it was listed under ExternalModuleDependencies). So if Appx is an external dependency remove it from RequiredModules when you next publish and then install should work or ensure Appx is present.
We've updated the docs here to be clearer about the intent of ExternalModuleDependencies
Anam Navied (@anamnavi) can you please reopen this issue? As Meelis Nigols (@peetrike) says we need to have the module listed in RequiredModules for the PowerShell engine to import the module before loading the desired one. This is for types and other such dependencies.
PSResourceGet should do the following.
If module is listed in RequiredModules and NOT ExternalModuleDependencies should install required module
If module is listed in RequiredModules and ExternalModuleDependencies should NOT install required module but write warning if module currently isn't present in PSModulePath
If module is listed in ExternalModuleDependencies should NOT install module but write warning if module currently isn't present in PSModulePath
Activity
peetrike commentedon May 15, 2025
also, #1467
anamnavi commentedon Sep 10, 2025
Hi Thomas Nieto (@ThomasNieto) my apologies for the delay in triaging this! Looking at
AnyPackage.Appxmodule manifest it appears you've gotAppxlisted underRequiredModulesand underExternalModuleDependencies. PowerShell and PSResourceGet expect a dependency module to be listed under either manifest element not both. (ie it won't detect it in both and then exclude it fromRequiredModulesbecause it was listed underExternalModuleDependencies). So ifAppxis an external dependency remove it fromRequiredModuleswhen you next publish and then install should work or ensure Appx is present.We've updated the docs here to be clearer about the intent of
ExternalModuleDependenciespeetrike commentedon Sep 11, 2025
RequiredModuleshas 2 meanings:So when module is included under
ExternalModuleDependenciesbut not underRequiredModules, the required module is not loaded, when module is loaded.ThomasNieto commentedon Sep 29, 2025
Anam Navied (@anamnavi) can you please reopen this issue? As Meelis Nigols (@peetrike) says we need to have the module listed in
RequiredModulesfor the PowerShell engine to import the module before loading the desired one. This is for types and other such dependencies.PSResourceGet should do the following.
RequiredModulesand NOTExternalModuleDependenciesshould install required moduleRequiredModulesandExternalModuleDependenciesshould NOT install required module but write warning if module currently isn't present inPSModulePathExternalModuleDependenciesshould NOT install module but write warning if module currently isn't present inPSModulePath