简体   繁体   中英

Electron-Builder: Failed building windows installer with squirrel on MacOS

I have searched after a solution to build a windows installer on MacOS with squirrel, but without any luck.

I have successfully installed mono via my terminal. Version 6.4.0.198 .

Versions: electron: ^4.2.5 electron-builder: ^20.41.0 electron-builder-squirrel-windows: ^20.44.0

I run the command npm run build:win , after a bit of packaging this error comes up

Error: Exit code: 255. Command failed: mono /Users/admin/Library/Caches/electron-builder/Squirrel.Windows/Squirrel.Windows-1.9.0/Update-Mono.exe --releasify /Users/admin/Desktop/myTestBuild/dist/squirrel-windows/mytestbuild-1.0.0-full.nupkg --releaseDir /Users/admin/Desktop/myTestBuild/dist/squirrel-windows 2019-10-05 18:55:36> Unhandled exception: System.ComponentModel.DataAnnotations.ValidationException: Description is required. at NuGet.Manifest.Validate (NuGet.Manifest manifest) [0x000b1] in <64ead1da9ab54e29ae45ecd50faea709>:0 at NuGet.Manifest.ReadFrom (System.IO.Stream stream, NuGet.IPropertyProvider propertyProvider, System.Boolean validateSchema) [0x0007b] in <64ead1da9ab54e29ae45ecd50faea709>:0 at NuGet.Manifest.ReadFrom (System.IO.Stream stream, System.Boolean validateSchema) [0x00006] in <64ead1da9ab54e29ae45ecd50faea709>:0 at NuGet.LocalPackage.ReadManifest (System.IO.Stream manifestStream) [0x00000] in <64ead1da9ab54e29ae45ecd50faea709>:0 at Z20055252BAD325BE70C329DCEE767 196Z.ZipPackage.EnsureManifest () [0x00050] in <64ead1da9ab54e29ae45ecd50faea709>:0 at NuGet.ZipPackage..ctor (System.String filePath, System.Boolean enableCaching) [0x00049] in <64ead1da9ab54e29ae45ecd50faea709>:0 at NuGet.ZipPackage..ctor (System.String filePath) [0x00000] in <64ead1da9ab54e29ae45ecd50faea709>:0 at Squirrel.Update.Program.ReleasifyElectron (System.String package, System.String targetDir, System.String baseUrl) [0x0000d] in <64ead1da9ab54e29ae45ecd50faea709>:0

Hope someone can help me, have a great day.

Finally found a solution!

your "description" in package.json cannot be empty. That is why it says

Description is required. at NuGet.Manifest.Validate........

This should definitely be added to docs of electron-builder and/or electron-builder-squirrel-windows.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM