Version: 19.56.2
Target: win10 64
When I run npm run dev my app works fine.
OKAY take it away `electron-builder`
• electron-builder version=19.56.2
• loaded configuration file=package.json ("build" field)
• no native production dependencies
• packaging platform=win32 arch=ia32 electron=1.8.7 appOutDir=build\win-ia32-unpacked
• building target=nsis file=build\xiucan Setup 0.0.0.exe archs=ia32 oneClick=true
Error: C:\Users\MuBan\AppData\Local\electron-builder\cache\nsis\nsis-3.0.1.13\Bin\makensis.exe exited with code 1
Output:
Command line defined: "APP_ID=org.simulatedgreg.electron-vue"
Command line defined: "APP_GUID=62e3eecb-e013-549b-8222-3caf500ba8f3"
Command line defined: "PRODUCT_NAME=xiucan"
Command line defined: "PRODUCT_FILENAME=xiucan"
Command line defined: "APP_FILENAME=xiucan"
Command line defined: "APP_DESCRIPTION=xiucan"
Command line defined: "VERSION=0.0.0"
Command line defined: "PROJECT_DIR=D:\ѧϰ\electron\xiucan"
Command line defined: "BUILD_RESOURCES_DIR=D:\ѧϰ\electron\xiucan\build"
Command line defined: "MUI_ICON=D:\ѧϰ\electron\xiucan\build\icons\icon.ico"
Command line defined: "MUI_UNICON=D:\ѧϰ\electron\xiucan\build\icons\icon.ico"
Command line defined: "APP_32=D:\ѧϰ\electron\xiucan\build\xiucan-0.0.0-ia32.nsis.7z"
Command line defined: "APP_32_NAME=xiucan-0.0.0-ia32.nsis.7z"
Command line defined: "APP_32_HASH=CEFD5467CF4F6FA191963DDF0B5AE426974F58C67479C499AC561A843C64DB2543D13A795B86B39D2D5447F553E4D4E3C0657EBE4CC706D91BB5315081309907"
Command line defined: "COMPANY_NAME=FANG"
Command line defined: "APP_INSTALLER_STORE_FILE=xiucan\installer.exe"
Command line defined: "COMPRESSION_METHOD=7z"
Command line defined: "ONE_CLICK"
Command line defined: "RUN_AFTER_FINISH"
Command line defined: "SHORTCUT_NAME=xiucan"
Command line defined: "UNINSTALL_DISPLAY_NAME=xiucan 0.0.0"
Command line defined: "COMPRESS=auto"
Command line defined: "BUILD_UNINSTALLER"
Command line defined: "UNINSTALLER_OUT_FILE=D:\ѧϰ\electron\xiucan\build\.__uninstaller-nsis-xiucan.exe"
Processing config: C:\Users\MuBan\AppData\Local\electron-builder\cache\nsis\nsis-3.0.1.13\nsisconf.nsh
Processing script file: "<stdin>" (ACP)
Error output:
!include: could not find: "D:\学习\electron\xiucan\node_modules\[email protected]@electron-builder-lib\templates\nsis\include\StdUtils.nsh"
Error in script "<stdin>" on line 1 -- aborting creation process
at ChildProcess.childProcess.once.code (D:\学习\electron\xiucan\node_modules\[email protected]@builder-util\src\util.ts:241:14)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
I have solved this problem.
你是怎么解决的?去掉中文目录?
I'm getting the exact same error, how did you solve it?
I'm getting the exact same error, how did you solve it?
For everyone who is getting this error, I just moved my source folder under C:/ and ran yarn run dist after clean package installation and it worked.
Possible Cause: Electron Builder script file doesn't support UTF-8 Chars, hence, if your folders are using Hebrew, Chinese, Turkish etc chars, it most likely going to fail.
_Solution:_ Simply move your source files in a ASCII supported folder path.
你是怎么解决的?去掉中文目录?
应该是权限问题。我在git的命令行里运行的时候会报这个错误。用window的命令行或者 PowerShell,就成功了。
你是怎么解决的?去掉中文目录?
应该是权限问题。我在git的命令行里运行的时候会报这个错误。用window的命令行或者 PowerShell,就成功了。
谢谢回复,我换了个目录,改成英文路径就好了~
Moved to backlog to keep issue list clear.
It is NSIS issue, and for now it is not easy to fix NSIS.
You need to have a full ASCII path so please consider to have an ASCII windows username.
Most helpful comment
For everyone who is getting this error, I just moved my source folder under C:/ and ran yarn run dist after clean package installation and it worked.
Possible Cause: Electron Builder script file doesn't support UTF-8 Chars, hence, if your folders are using Hebrew, Chinese, Turkish etc chars, it most likely going to fail.
_Solution:_ Simply move your source files in a ASCII supported folder path.