electron-vue build报错ERROR Cannot spawn...Error: spawn EACCES
使用vue cli3搭建出来的vue+ts+electron的demo
打包总是出问题报错Error: Cannot spawn ... Error: spawn EACCES
INFO Building app with electron-builder:
• electron-builder version=20.39.0
• description is missed in the package.json appPackageFile=F:\webProject\electron\dist_electron\bundled\package.json
• author is missed in the package.json appPackageFile=F:\webProject\electron\dist_electron\bundled\package.json
• no native production dependencies
• packaging platform=win32 arch=x64 electron=4.1.5 appOutDir=dist_electron\win-unpacked
• default Electron icon is used reason=application icon is not set
• building target=nsis file=dist_electron\electron Setup 0.1.0.exe archs=x64 oneClick=true perMachine=false
ERROR Error: Cannot spawn C:\Users\Sercl\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.3.2\Bin\makensis.exe: Error: spawn EACCES
at ChildProcess.spawn (internal/child_process.js:313:11)
at exports.spawn (child_process.js:503:9)
at doSpawn (F:\webProject\electron\node_modules\builder-util\src\util.ts:167:12)
at spawnAndWrite (F:\webProject\electron\node_modules\builder-util\src\util.ts:175:24)
at F:\webProject\electron\node_modules\app-builder-lib\src\targets\nsis\NsisTarget.ts:508:11
at Generator.next (<anonymous>)
at Generator.tryCatcher (F:\webProject\electron\node_modules\bluebird\js\release\util.js:16:23)
at PromiseSpawn._promiseFulfilled (F:\webProject\electron\node_modules\bluebird\js\release\generators.js:97:49)
at Promise._settlePromise (F:\webProject\electron\node_modules\bluebird\js\release\promise.js:574:26)
at Promise._settlePromise0 (F:\webProject\electron\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (F:\webProject\electron\node_modules\bluebird\js\release\promise.js:694:18)
at _drainQueueStep (F:\webProject\electron\node_modules\bluebird\js\release\async.js:138:12)
at _drainQueue (F:\webProject\electron\node_modules\bluebird\js\release\async.js:131:9)
at Async._drainQueues (F:\webProject\electron\node_modules\bluebird\js\release\async.js:147:5)
at Immediate.Async.drainQueues (F:\webProject\electron\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
....
用的是windows,也设置那个.exe文件为管理员权限了,但是不管用,奇怪的是打包出来的东西可以正常用(或许demo中没写什么内容所以能用).
重装依赖,手动下载打包依赖等等都试过不管用.换另一台电脑就不报错好使了,正常打包的电脑我复制AppData/local的electron-builder和electron文件放自己电脑里也不行,就连cli3重新构建一个新的没有内容的electron项目也会打包报这个错.
求大大这可能会是什么问题造成的
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论