无法用电子伪造的电子包装机建造 [英] Unable to build with electron-packager within electron-forge

查看:70
本文介绍了无法用电子伪造的电子包装机建造的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用电子伪造创建了一个默认项目.当我尝试使用命令 electron-forge 打包我的项目时,该过程退出并出现以下错误.

I have created a default project with electron-forge. When I try to package my project with the command electron-forge, the process exits with the following error.

我做错了什么?我按照说明在 electron-forge 上的发球台上.

What am I doing wrong? I followed the instructions to a tee at electron-forge.

$ electron-forge package
✔ Checking your system
✔ Preparing to Package Application for arch: x64
✔ Compiling Application
✔ Preparing native dependencies
⠦ Packaging Application
An unhandled rejection has occurred inside Forge:
Command failed: npm prune --production
npm WARN electron-example@1.0.0 No repository field.

npm ERR! May not delete: /tmp/electron-packager/linux-x64/electron-example-linux-x64/resources/app/node_modules/.bin

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/maxchehab/.npm/_logs/2017-07-21T04_40_37_618Z-debug.log

Error: Command failed: npm prune --production
npm WARN electron-example@1.0.0 No repository field.

npm ERR! May not delete: /tmp/electron-packager/linux-x64/electron-example-linux-x64/resources/app/node_modules/.bin

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/maxchehab/.npm/_logs/2017-07-21T04_40_37_618Z-debug.log

    at ChildProcess.exithandler (child_process.js:270:12)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:921:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

谢谢您的时间.

推荐答案

npm的更高版本解决了问题,请考虑升级到最新的v(> 5.4.2 ),而不是降级到 5.2 :

Problem is solved in later versions of npm, please consider upgrading to the latest v ( > 5.4.2) instead of downgrading to 5.2:

npm i -g npm

这篇关于无法用电子伪造的电子包装机建造的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆