electron-vue在npm run build时报错 ? cannot execute cause=fork/ex

时间:2020-12-08 18:46:14

问题描述

在electron-vue执行npm run build时报错,错误如下:

? cannot execute cause=fork/exec C:Users801AppDataLocalelectron-builderCachewinCodeSignwinCodeSign-2.5.0rcedit-ia32.exe: Access is denied.
command=‘C:Users801AppDataLocalelectron-builderCachewinCodeSignwinCodeSign-2.5.0rcedit-ia32.exe‘ ‘C:tempwechatbuildwin-ia32-unpackedwechat.exe‘ --set-version-string FileDescription wechat --set-version-string ProductName wechat --set-version-string LegalCopyright ‘Copyright © 2019 wechat‘ --set-file-version 0.0.1 --set-product-version 0.0.1.0 --set-version-string InternalName wechat --set-version-string OriginalFilename ‘‘
workingDir=
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `node .electron-vue/build.js && electron-builder`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:Users801AppDataRoamingnpm-cache_logs2019-10-21T10_06_37_071Z-debug.log

解决方式

发现电脑右下角有一个提示,那个提示现在也没法重现了,大概意思就是这个执行程序被我设置阻止运行了,点击打开,把他移除被阻止运行即可。