An unhandled error has occurred inside Forge: An error occured while making for target: squirrel

项目场景:

在使用electron打包的时候npm run make出现如下问题


问题描述:

例如:错误代码:
An unhandled error has occurred inside Forge:
An error occured while making for target: squirrel
Failed with exit code: 1
Output:
���ڳ��Դӡ�my_electron_app.nuspecï¿½ï¿½ï¿½ï¿½ï¿½É³ï¿½ï¿½ï¿½ï¿½ï¿½ï¿                          ½
Description is required.

Error: Failed with exit code: 1
Output:
���ڳ��Դӡ�my_electron_app.nuspecï¿½ï¿½ï¿½ï¿½ï¿½É³ï¿½ï¿½ï¿½ï¿½ï¿½ï¿                          ½
Description is required.

    at ChildProcess.<anonymous> (C:\Users\Admin\Desktop\Electrion\my-electron-ap                          p\node_modules\electron-winstaller\src\spawn-promise.ts:52:16)
    at ChildProcess.emit (events.js:315:20)
    at ChildProcess.EventEmitter.emit (domain.js:483:12)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)


原因分析:

package.json文件里面的description字段为空

description字段作用是:一个描述,方便别人了解你的模块作用,搜索的时候也有用。


解决方案:

为description字段添加内容,例如:
"description": "My Electron app"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值