Weird Publish-Module errors

Recently, I was trying to publish a module and ran into an error:

Failed to generate the compressed file for module ‘Attempting to build package …’

After searching for a bit, I found someone who fixed a similar issue with a nuget reisntall. That got me thinking that my psd1 was not problematic, but rather my PowerShellGet was problematic.

So I Save-Module PowerShellGet -Path C:\temp then deleted the current PowerShellGet (manually using Explorer), reinstalled and voila. I was able to publish my module.

Chrissy is a Cloud and Datacenter Management & Data Platform MVP who has worked in IT for over 20 years. She is the creator of the popular SQL PowerShell module dbatools and holds a master's degree in Systems Engineering. Chrissy is also certified in SQL Server, Linux, SharePoint and network security. You can follow her on Twitter at @cl.

Posted in Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *

*