electron-vue build Error: spawn EPERM ?

发布于 2022-09-07 16:23:05 字数 5293 浏览 11 评论 0

使用electron-vue脚手架构建的项目,通过electron-builder方式打包时报错如下:
Error: spawn EPERM

at _errnoException (util.js:1024:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at exports.spawn (child_process.js:502:9)
at exports.execFile (child_process.js:212:15)
at default (/Users/bobo/Desktop/des-bulider/node_modules/builder-util/src/util.ts:86:5)
at exec (/Users/bobo/Desktop/des-bulider/node_modules/builder-util/src/util.ts:85:3)
at wineExecutable.value.then.wine (/Users/bobo/Desktop/des-bulider/node_modules/builder-util/src/wine.ts:72:16)

From previous event:

at execWine (/Users/bobo/Desktop/des-bulider/node_modules/builder-util/src/wine.ts:64:8)
at /Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/src/winPackager.ts:326:11
at Generator.next (<anonymous>)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)

From previous event:

at WinPackager.signAndEditResources (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/out/winPackager.js:405:11)
at /Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/src/winPackager.ts:343:18
at Generator.next (<anonymous>)

From previous event:

at WinPackager.signApp (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/out/winPackager.js:423:11)
at /Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/src/platformPackager.ts:209:16
at Generator.next (<anonymous>)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)

From previous event:

at WinPackager.doPack (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/out/platformPackager.js:276:11)
at /Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/src/platformPackager.ts:113:16
at Generator.next (<anonymous>)

From previous event:

at WinPackager.pack (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/out/platformPackager.js:196:11)
at /Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/src/packager.ts:364:24
at Generator.next (<anonymous>)
at xfs.stat (/Users/bobo/Desktop/des-bulider/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
at /Users/bobo/Desktop/des-bulider/node_modules/graceful-fs/polyfills.js:287:18
at FSReqWrap.oncomplete (fs.js:153:5)

From previous event:

at Packager.doBuild (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/out/packager.js:432:11)
at /Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/src/packager.ts:308:52
at Generator.next (<anonymous>)
at /Users/bobo/Desktop/des-bulider/node_modules/graceful-fs/graceful-fs.js:99:16
at /Users/bobo/Desktop/des-bulider/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:135:15)

From previous event:

at Packager._build (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/out/packager.js:376:11)
at /Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/src/packager.ts:270:23
at Generator.next (<anonymous>)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)

From previous event:

at Packager.build (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder-lib/out/packager.js:332:11)
at /Users/bobo/Desktop/des-bulider/node_modules/electron-builder/src/builder.ts:310:40
at Generator.next (<anonymous>)

From previous event:

at _build (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder/out/builder.js:61:21)
at build (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder/src/builder.ts:280:10)
at then (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder/src/cli/cli.ts:48:33)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)

From previous event:

at Object.args [as handler] (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder/src/cli/cli.ts:48:33)
at Object.runCommand (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder/node_modules/yargs/lib/command.js:235:44)
at Object.parseArgs [as _parseArgs] (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder/node_modules/yargs/yargs.js:1074:24)
at Object.get [as argv] (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder/node_modules/yargs/yargs.js:989:21)
at Object.<anonymous> (/Users/bobo/Desktop/des-bulider/node_modules/electron-builder/src/cli/cli.ts:42:15)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3

通过查找相关问题说是设置文件为777,通过设置后依然报错
请教哪位大侠遇到过此类问题,还望指点。感谢!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文