When i run dist, receive this error and i dont know what to do
Error: C:\Users\Yuri\AppData\Local\electron-builder\cache\nsis\nsis-3.0.1.5\Bin\makensis.exe exited with code 1
Output:
Command line defined: "APP_ID=isyBuy.id"
Command line defined: "APP_GUID=d9953cb9-011d-5fbc-b657-7cf8430c55d3"
Command line defined: "PRODUCT_NAME=isyBuy"
Command line defined: "PRODUCT_FILENAME=isyBuy"
Command line defined: "APP_FILENAME=isyBuy"
Command line defined: "APP_DESCRIPTION=BuildTest"
Command line defined: "VERSION=2.0.0"
Command line defined: "COMPANY_NAME=isyBuy"
Command line defined: "PROJECT_DIR=C:\xampp\htdocs\isyBuy\Electron\1.0"
Command line defined: "BUILD_RESOURCES_DIR=C:\xampp\htdocs\isyBuy\Electron\1.0build"
Command line defined: "MUI_ICON=C:\xampp\htdocs\isyBuy\Electron\1.0build\icon.ico"
Command line defined: "MUI_UNICON=C:\xampp\htdocs\isyBuy\Electron\1.0build\icon.ico"
Command line defined: "APP_64=C:\xampp\htdocs\isyBuy\Electron\1.0\dist\isyBuy-2.0.0-x64.nsis.7z"
Command line defined: "RUN_AFTER_FINISH"
Command line defined: "COMPRESS=auto"
Command line defined: "ONE_CLICK"
Command line defined: "UNINSTALLER_OUT_FILE=C:\Users\Yuri\AppData\Local\Temp\electron-builder-Gbcvg5\0-1-uninstaller.exe"
Processing config: C:\Users\Yuri\AppData\Local\electron-builder\cache\nsis\nsis-3.0.1.5\nsisconf.nsh
Processing script file: "
Processed 1 file, 11 command line commands, writing output (x86-unicode):
Output: "C:\xampp\htdocs\isyBuy\Electron\1.0\dist\isyBuy Setup 2.0.0.exe"
Error output:
Can't open output file
Error - aborting creation process
at ChildProcess.childProcess.once.code (C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder-util\src\util.ts:134:14)
at ChildProcess.g (events.js:291:16)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
From previous event:
at C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder\src\targets\nsis.ts:299:5
From previous event:
at NsisTarget.executeMakensis (C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder\out\targets\nsis.js:343:11)
at C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder\src\targets\nsis.ts:213:58
at next (native)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
From previous event:
at NsisTarget.buildInstaller (C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder\out\targets\nsis.js:260:11)
at C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder\src\targets\nsis.ts:59:18
at next (native)
From previous event:
at NsisTarget.finishBuild (C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder\out\targets\nsis.js:133:11)
at C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder\src\packager.ts:179:31
From previous event:
at Packager.doBuild (C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder\out\packager.js:299:11)
at C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder\src\packager.ts:143:38
at next (native)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
From previous event:
at Packager.build (C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder\out\packager.js:251:11)
at C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder\srcbuilder.ts:214:40
at next (native)
From previous event:
at build (C:\xampp\htdocs\isyBuy\Electron\1.0\node_modules\electron-builder\outbuilder.js:63:21)
at Object.
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Yuri\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "dist"
npm ERR! node v6.9.4
npm ERR! npm v4.1.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dist: build
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the [email protected] dist script 'build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the isyBuy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs isyBuy
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls isyBuy
npm ERR! There is likely additional logging output above.
And here is my build section:
"build": {
"appId": "isyBuy.id",
"mac": {
"category": "your.app.category.type"
},
"win": {
"iconUrl": "(windows-only) https link to icon"
}
}
Please try to remove dist dir or restart Windows.
Those are my scripts:
"scripts": {
"start": "electron .",
"rebuild": "./node_modules/.bin/electron-rebuild -f -w node_modules/printer",
"pack": "build --dir",
"dist": "build"
}
Side note — electron-rebuild is not required, please use install-app-deps (part of electron-builder).
C:\xampp\htdocs\isyBuy\Electron\1.0\dist\isyBuy Setup 2.0.0.exe
Is this file created when you get error? Is directory created? Why path is so strange — are you sure that permissions are correct?
Yes, this command creates win-unpacked directory inside the dist directory.
IsyBuy Setup 2.0.0.exe is created too with 129KB (obviously didnt work)
I use electron-rebuild to insert node_module "printer" inside in the project because he is not a native electron module
install-app-deps did this work like that?
Is build success if project dir located in your user home directory?
ill try that
Even in:
[email protected] dist C:\Users\Yuri\Desktop\Electron\1.0
build
The command receive the same error
makensis.exe exited with code 1
I have no idea. Could you please maybe try to build on CI server or using our docker image?
Strange... After I installed this NSIS, the builder worked
http://nsis.sourceforge.net/Main_Page
One last question, is NSIS installed a prerequisite?
No, NSIS installation not required. Please specify windows version.
Windows 10 Home Single Lang - 64 bit
And for note, I've builded the same project 1 month ago and worked, the only differences is that I've updated Windows, npm and node
Thanks for info. Yeah, some strange windows issue.
The problem has returned,but I solved deleting the Nsis's directory in appdata/local/electron-builder/cache/nsis. Recreating this part in building worked
Most helpful comment
Strange... After I installed this NSIS, the builder worked
http://nsis.sourceforge.net/Main_Page
One last question, is NSIS installed a prerequisite?