Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to avoid installing required modules locally when publishing a module. #989

Unanswered
denisky asked this question in Q&A
Discussion options

I have a module B which requires a module A.
I'm trying to publish the module to a local repository using Publish-PSResource command.

This fails if the module is not installed locally:

PS C:\> Publish-PSResource -Path .\B\ -Repository PSLocalRepository 
Publish-PSResource : Module manifest file validation failed with error: The specified RequiredModules entry 'A' in the module manifest 
'C:\B\B.psd1' is invalid. Try again after updating this entry with valid values.. Run 'Test-ModuleManifest' to validate the 
module manifest.
At line:1 char:1
+ Publish-PSResource -Path .\B\ -Repository PSLoca ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + CategoryInfo : InvalidOperation: (Microsoft.Power...blishPSResource:PublishPSResource) [Publish-PSResource], PSInvalidOperationException
 + FullyQualifiedErrorId : InvalidModuleManifest,Microsoft.PowerShell.PowerShellGet.Cmdlets.PublishPSResource

I tried the option -SkipDependenciesCheck but I'm getting the same behavior.

Is it a supported use case?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /