Tiven

Tiven

博观而约取,厚积而薄发

天问的个人网站(天问博客),专注于Node.js、Vue.js、React、Vite、Npm、Nginx等大前端技术。不断学习新技术,记录日常开发问题,持续分享coding,极客开源,共同进步。生命不息,奋斗不止... [ hexo blog ]

electron-builder报错errorOut=Fatal error: Unable to commit changes


在 electron 项目中,使用 electron-builder 打包报错:⨯ cannot execute cause=exit status 1 errorOut=Fatal error: Unable to commit changes

electron-builder

完整报错信息

  • building block map  blockMapFile=dist\net-stats-1.0.0-setup.exe.blockmap
  ⨯ cannot execute  cause=exit status 1
                    errorOut=Fatal error: Unable to commit changes

                    command='C:\Users\demo\AppData\Local\electron-builder\Cache\winCodeSign\winCodeSign-2.6.0\rcedit-x64.exe' 'D:\project\net-sta
ts\dist\squirrel-windows\Net Stats Setup 1.0.0.exe' --set-version-string FileDescription 'Net Stats' --set-version-string ProductName 'Net Stat
s' --set-version-string LegalCopyright 'Copyright © 2023 example.com' --set-file-version 1.0.0 --set-product-version 1.0.0.0 --set-version-stri
ng CompanyName example.com --set-icon 'D:\project\net-stats\resources\logo.ico'
                    errorOut=Fatal error: Unable to commit changes

                    command='C:\Users\demo\AppData\Local\electron-builder\Cache\winCodeSign\winCodeSign-2.6.0\rcedit-x64.exe' 'D:\project\net-sta
ts\dist\squirrel-windows\Net Stats Setup 1.0.0.exe' --set-version-string FileDescription 'Net Stats' --set-version-string ProductName 'Net Stat
  • Above command failed, retrying 2 more times

解决办法

关闭相关杀毒软件,如:360、电脑管家 等等,再次执行打包程序就不会出现以上错误提示了。


欢迎访问:天问博客