electron打包报错
E:\electronDir\chapter1>yarn run make
yarn run v1.22.17
$ electron-forge make
√ Checking your system
√ Resolving Forge Config
We need to package your application before we can make it
√ Preparing to Package Application for arch: x64
√ Preparing native dependencies
√ Packaging Application
Making for the following targets: squirrel
× Making for target: squirrel - On platform: win32 - For arch: x64
An unhandled error has occurred inside Forge:
An error occured while making for target: squirrel
Failed with exit code: 1
Output:
���ڳ��Դӡ�chapter1.nuspec�����ɳ������
Authors is required.
Description is required.
Error: Failed with exit code: 1
Output:
���ڳ��Դӡ�chapter1.nuspec�����ɳ������
Authors is required.
Description is required.
at ChildProcess.<anonymous> (E:\electronDir\chapter1\node_modules\electron-winstaller\src\spawn-promise.ts:52:16)
at ChildProcess.emit (node:events:390:28)
at ChildProcess.emit (node:domain:475:12)
at maybeClose (node:internal/child_process:1064:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
解决办法:
在package.json中,author,description字段不能为空。
electron打包报错
https://www.zhaojun.inkhttps://www.zhaojun.ink/archives/electron-package-error