➜ npm run make
> desktop-dictionary@1.0.0 make
> 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
An unhandled rejection has occurred inside Forge:
Error: Could not find any make targets configured for the "win32" platform.
Electron Forge was terminated. Location:
{}
➜ npm run make
> desktop-dictionary@1.0.0 make
> 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
Error: Failed with exit code: 1
Output:
正在尝试从“desktop_dictionary.nuspec”生成程序包。
Authors is required.
Description is required.
at ChildProcess.<anonymous> (C:\mywork\hubproject\desktop-dictionary\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)
1.electron-forge make
卸载后重装,没有这个问题,但出现了新问题:
在 package.json 中补充以上信息:
回头再看,感觉是配置问题。
都删除后,重新安装,根据官网,添加配置。
安装 electron-forge 后的默认配置:
修改后的配置:
然后打包没有异常,不能说成功,因为没有输出预期的“打包”文件。