首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在电子锻造中使用电子包装机进行制造

无法在电子锻造中使用电子包装机进行制造
EN

Stack Overflow用户
提问于 2017-07-21 04:52:55
回答 2查看 2.2K关注 0票数 4

我已经创建了一个电子伪造默认项目。当我尝试用命令electron-forge打包我的项目时,进程退出时会出现以下错误。

我做错了什么?我按照指示来到了电子锻造的一个发球台。

代码语言:javascript
复制
$ 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)

谢谢您抽时间见我。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-10-03 04:04:06

问题已经解决,请考虑升级到最新版本的v(> 5.4.2),而不是降级到5.2

代码语言:javascript
复制
npm i -g npm
票数 1
EN

Stack Overflow用户

发布于 2017-07-21 09:45:33

看起来,最新版本的npm为电子制造过程引入了一个bug。问题在这里被追踪。Github问题

尝试此解决方案,以获得可能的修复(未经测试):

代码语言:javascript
复制
rm -rf node_modules
npm install --production --ignore-scripts
npm install --no-save electron-rebuild --ignore-scripts
node_modules/.bin/electron-rebuild
npm remove electron-rebuild --ignore-scripts

或者将npm降级到5.3以下的版本(测试,工作)。

代码语言:javascript
复制
npm i -g npm@5.2
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45229218

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档