electron 打包报错 npm ERR! code ELIFECYCLE npm ERR! errno 1

报错原因:路径文件夹有中文 把放项目的文件夹中文名换成英文即可

 INFO  Building app with electron-builder:
  • electron-builder  version=22.14.13 os=10.0.19044
  • description is missed in the package.json  appPackageFile=F:\桌面应用\gitee-electron\electron-vue-updater\upms-dist\bundled\package.json
  • writing effective config  file=upms-dist\builder-effective-config.yaml
  • rebuilding native dependencies  dependencies=node-sass@4.14.1 platform=win32 arch=x64
  • packaging       platform=win32 arch=x64 electron=11.5.0 appOutDir=upms-dist\win-unpacked
  • rebuilding native dependencies  dependencies=node-sass@4.14.1 platform=win32 arch=ia32
  • packaging       platform=win32 arch=ia32 electron=11.5.0 appOutDir=upms-dist\win-ia32-unpacked
  • building        target=nsis file=upms-dist\upms Setup 7.0.1.exe archs=x64, ia32 oneClick=false perMachine=false
ExecError: C:\Users\Dell\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Output:
Command line defined: "APP_ID=wltDemo.com"
Command line defined: "APP_GUID=219d9a4d-7584-5eae-b725-3254e673d7d0"
Command line defined: "UNINSTALL_APP_KEY=219d9a4d-7584-5eae-b725-3254e673d7d0"
Command line defined: "PRODUCT_NAME=upms"
Command line defined: "PRODUCT_FILENAME=upms"
Command line defined: "APP_FILENAME=upms"
Command line defined: "APP_DESCRIPTION="
Command line defined: "VERSION=7.0.1"
Command line defined: "PROJECT_DIR=F:\����Ӧ��\gitee-electron\electron-vue-updater"
Command line defined: "BUILD_RESOURCES_DIR=F:\����Ӧ��\gitee-electron\electron-vue-updater\build"
Command line defined: "APP_PACKAGE_NAME=form_generator"
Command line defined: "MUI_ICON=F:\����Ӧ��\gitee-electron\electron-vue-updater\favicon.ico"
Command line defined: "MUI_UNICON=F:\����Ӧ��\gitee-electron\electron-vue-updater\favicon.ico"
Command line defined: "APP_32=F:\����Ӧ��\gitee-electron\electron-vue-updater\upms-dist\form_generator-7.0.1-ia32.nsis.7z"
Command line defined: "APP_32_NAME=form_generator-7.0.1-ia32.nsis.7z"
Command line defined: "APP_32_HASH=14A7DA38CD4EFD692458D646715EDC571B5363E6868DF25336A0D66AB8D5AB63ECE79E6501DDBCECEE4A7745F070C89EE7B2170C4D63CFBB8313BB80EE1C286D"
Command line defined: "APP_64=F:\����Ӧ��\gitee-electron\electron-vue-updater\upms-dist\form_generator-7.0.1-x64.nsis.7z"
Command line defined: "APP_64_NAME=form_generator-7.0.1-x64.nsis.7z"
Command line defined: "APP_64_HASH=148061630FCD72C60B7F3138DA98184865EF022344D76AD3467A341C9A5C3188B609DC2DCFEDB2425242A68C5DFB862E5EB550584F1FF039F3EB79695E97FACA"
Command line defined: "COMPANY_NAME=irony"
Command line defined: "APP_INSTALLER_STORE_FILE=form_generator-updater\installer.exe"
Command line defined: "COMPRESSION_METHOD=7z"
Command line defined: "MULTIUSER_INSTALLMODE_ALLOW_ELEVATION"
Command line defined: "INSTALL_MODE_PER_ALL_USERS_REQUIRED"
Command line defined: "allowToChangeInstallationDirectory"
Command line defined: "SHORTCUT_NAME=upms"
Command line defined: "UNINSTALL_DISPLAY_NAME=upms 7.0.1"
Command line defined: "MUI_WELCOMEFINISHPAGE_BITMAP=${NSISDIR}\Contrib\Graphics\Wizard\nsis3-metro.bmp"
Command line defined: "MUI_UNWELCOMEFINISHPAGE_BITMAP=${NSISDIR}\Contrib\Graphics\Wizard\nsis3-metro.bmp"
Command line defined: "UNINSTALLER_ICON=F:\����Ӧ��\gitee-electron\electron-vue-updater\favicon.ico"
Command line defined: "ESTIMATED_SIZE=556405"
Command line defined: "COMPRESS=auto"
Command line defined: "BUILD_UNINSTALLER"
Command line defined: "UNINSTALLER_OUT_FILE=F:\����Ӧ��\gitee-electron\electron-vue-updater\upms-dist\__uninstaller-nsis-form_generator.exe"
Processing config: C:\Users\Dell\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\nsisconf.nsh
Processing script file: "<stdin>" (ACP)

Error output:
!include: could not find: "F:\桌面应用\gitee-electron\electron-vue-updater\node_modules\app-builder-lib\templates\nsis\include\StdUtils.nsh"
Error in script "<stdin>" on line 1 -- aborting creation process

    at ChildProcess.<anonymous> (F:\桌面应用\gitee-electron\electron-vue-updater\node_modules\builder-util\src\util.ts:250:14)
    at Object.onceWrapper (node:events:483:26)
    at ChildProcess.emit (node:events:376:20)
    at ChildProcess.cp.emit (F:\桌面应用\gitee-electron\electron-vue-updater\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (node:internal/child_process:1063:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5) {
  exitCode: 1,
  alreadyLogged: false,
  code: 'ERR_ELECTRON_BUILDER_CANNOT_EXECUTE'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! form_generator@7.0.1 electron:build: `vue-cli-service electron:build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the form_generator@7.0.1 electron: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!     D:\Program Files\nodejs\node_cache\_logs\2022-06-09T05_56_05_903Z-debug.log
PS F:\桌面应用\gitee-electron\electron-vue-updater>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值