Error to publish module to private repository

I’m trying to publish a module, which I wrote, to a local repository. The repository is correctly created, if I type
I see it. When I launch the command
Publish-Module -Path C:\Modules\mymodule -Repository MyRepository
the error that appears is the following

Publish-PSArtifactUtility : Failed to generate the compressed file for module 'Failed to index into an array
In C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:10990 car:17
+ ... Publish-PSArtifactUtility @PublishPSArtifactUtility_Param ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
     + CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException
     + FullyQualifiedErrorId : FailedToCreateCompressedModule,Publish-PSArtifactUtility