electron-vue 打包时报错解决方法
electron-vue项目中,运行npm run build,会开始下载组件,并且打包成安装包。
但是如果开启了安全工具,可能就会报错:
cannot move downloaded into final location (another process downloaded faster?) error=rename C:\Users\Administrator\AppData\Local\electron-builder\Cache\winCodeSign\870395875 C:\Users\Administrator\AppData\Local\electron-builder\Cache\winCodeSign\winCodeSign-2.4.0: Access is denied. path=C:\Users\Administrator\AppData\Local\electron-builder\Cache\winCodeSign\winCodeSign-2.4.0 tempFile=C:\Users\Administrator\AppData\Local\electron-builder\Cache\winCodeSign\870395875 Error: Exit code: ENOENT. spawn C:\Users\Administrator\AppData\Local\electron-builder\Cache\winCodeSign\winCodeSign-2.4.0\rcedit-ia32.exe ENOENT at P:\code\electron\my-project\node_modules\builder-util\src\util.ts:126:16
原因是node打包的时候,是单线程运行,火绒实时监控在检测到文件生成后,会对改文件做扫描。火绒实时监控的逻辑会保证在火绒扫描时,后续进程对该文件的同步操作被阻塞,所以报错。
解决方法是关闭火绒等安全软件即可。
版权声明:
作者:applek
链接:https://www.lovestu.com/electronvuebuilderro.html
文章版权归作者所有,未经允许请勿转载。
THE END