Trouble Updating My PowerShell Module: Need Help!

0
9
Asked By CuriousCoder92 On

I'm trying to update my first module on the PowerShell Gallery, but I'm running into a problem. Every time I attempt to publish, I get an error that says: "The specified module with path 'C:Software ReposFreeChuckNorrisJokesSource' was not published because no valid module was found with that path." I've checked everything with Test-ModuleManifest and there were no issues. I know that both the .psd1 and .psm1 files are in the path I'm referencing. If it helps, here's the [GitHub link to my module](https://github.com/ITNinja01/FreeChuckNorrisJokes). Can anyone help me figure out what I might be missing? Thanks!

2 Answers

Answered By CodeNinja42 On

Can you share the exact command you're using to publish? It helps to see how you're setting it up to find any potential issues.

CuriousCoder92 -

Sure! I'm using: publish-Module -Path 'C:Software ReposFreeChuckNorrisJokesSource' -Repository PSGallery -NuGetApiKey 'n/a'.

Answered By TechHelper101 On

First off, check the names of your .psd1 and .psm1 files. They should match the name of the parent folder for the module. If the folder is named 'Source', you might run into issues because it needs to be named after the module itself.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.