Closed celestale closed 6 years ago
OK, I'll try cloning on my Windows machine to see if this happens to me. It looks like it may be an issue with rimraf, which I've had trouble with on Windows before. Try running build --win --x64
without the previous rimraf and let me know if it works.
Thanks for your reply. Attached is the error log for build --win --x64
C:\Users\desk\Downloads\angular-electron-dream-starter>set DEBUG=electron-builder
C:\Users\desk\Downloads\angular-electron-dream-starter>npm run package:windows
> angular-electron-dream-starter@7.0.0 package:windows C:\Users\desk\Downloads\angular-electron-dream-starter
> build --win --x64
electron-builder 19.31.1
electron-builder Effective config:
electron-builder appId: com.electron.angular-electron-dream-starter
electron-builder directories:
electron-builder buildResources: src/resources
electron-builder output: packages
electron-builder app: dist
electron-builder mac:
electron-builder category: public.app-category.graphics-design
electron-builder target:
electron-builder - dmg
electron-builder linux:
electron-builder target:
electron-builder - AppImage
electron-builder - snap
electron-builder asar: true
electron-builder +0ms
electron-builder Two package.json structure is used (dev: C:\Users\desk\Downloads\angular-electron-dream-starter\package.json, app: C:\Users\desk\Downloads\angular-electron-dream-starter\dist\package.json) +693ms
No native production dependencies
Packaging for win32 x64 using electron 1.7.8 to packages\win-unpacked
electron-builder Spawning C:\Users\desk\Downloads\angular-electron-dream-starter\node_modules\7zip-bin-win\x64\7za.exe x -bd C:\Users\desk\AppData\Local\electron\Cache\electron-v1.7.8-win32-x64.zip -aoa -oC:\Users\desk\Downloads\angular-electron-dream-starter\packages\win-unpacked +997ms
7-Zip (a) 17.01 beta (x64) : Copyright (c) 1999-2017 Igor Pavlov : 2017-08-28
Scanning the drive for archives:
1 file, 53893838 bytes (52 MiB)
Extracting archive: C:\Users\desk\AppData\Local\electron\Cache\electron-v1.7.8-win32-x64.zip
--
Path = C:\Users\desk\AppData\Local\electron\Cache\electron-v1.7.8-win32-x64.zip
Type = zip
Physical Size = 53893838
Everything is Ok
Files: 117
Size: 138386632
Compressed: 53893838
electron-builder 7za.exe (17340) exited with exit code 0 +2s
electron-builder node_modules\7zip\7zip-lite\7-zip.dll is not packed into asar archive - contains executable code +2s
electron-builder Executing C:\Users\desk\AppData\Local\electron-builder\cache\winCodeSign\winCodeSign-1.9.0\rcedit.exe C:\Users\desk\Downloads\angular-electron-dream-starter\packages\win-unpacked\Angular Electron Dream Starter.exe --set-version-string FileDescription Angular Electron Dream Starter --set-version-string ProductName Angular Electron Dream Starter --set-version-string LegalCopyright Copyright © 2017 Colin Skow --set-file-version 7.0.0 --set-product-version 7.0.0.0 --set-version-string InternalName Angular Electron Dream Starter --set-version-string OriginalFilename --set-version-string CompanyName Colin Skow --set-icon C:\Users\desk\Downloads\angular-electron-dream-starter\src\resources\icon.ico +2s
wine&sign: 0s 871ms
Building nsis installer (x64)
electron-builder Spawning C:\Users\desk\Downloads\angular-electron-dream-starter\node_modules\7zip-bin-win\x64\7za.exe a -bd -mx=9 -mtc=off -mtm=off -mta=off C:\Users\desk\Downloads\angular-electron-dream-starter\packages\angular-electron-dream-starter-7.0.0-x64.nsis.7z . +875ms
electron-builder cwd: C:\Users\desk\Downloads\angular-electron-dream-starter\packages\win-unpacked +0ms
electron-builder 7za.exe (10848) exited with exit code 0 +48s
nsis package, x64: 48s 58ms
electron-builder Spawning C:\Users\desk\AppData\Local\electron-builder\cache\nsis\nsis-3.0.2.1\Bin\makensis.exe -WX -DAPP_ID=com.electron.angular-electron-dream-starter -DAPP_GUID=048e184b-f508-5554-89f6-b0956f1e25e5 -DPRODUCT_NAME=Angular Electron Dream Starter -DPRODUCT_FILENAME=Angular Electron Dream Starter -DAPP_FILENAME=angular-electron-dream-starter -DAPP_DESCRIPTION=An Angular 2 Electron Starter kit featuring Webpack, Angular 2 (Router, Http, Forms, Services, ngrx, Tests, E2E, Coverage), Karma, Protractor, Jasmine, Istanbul, and TypeScript -DVERSION=7.0.0 -DPROJECT_DIR=C:\Users\desk\Downloads\angular-electron-dream-starter -DBUILD_RESOURCES_DIR=C:\Users\desk\Downloads\angular-electron-dream-starter\src\resources -DCOMPANY_NAME=Colin Skow -DAPP_PRODUCT_FILENAME=Angular Electron Dream Starter -DMUI_ICON=C:\Users\desk\Downloads\angular-electron-dream-starter\src\resources\icon.ico -DMUI_UNICON=C:\Users\desk\Downloads\angular-electron-dream-starter\src\resources\icon.ico -DAPP_64=C:\Users\desk\Downloads\angular-electron-dream-starter\packages\angular-electron-dream-starter-7.0.0-x64.nsis.7z -DAPP_64_NAME=angular-electron-dream-starter-7.0.0-x64.nsis.7z -DAPP_64_HASH=58720A65E66F2EEDA88F91D00F5E52266657C46B4AA7A34AE5237597238496520DDB4D15D912BFF16C773B54C0AAC1E5445D67933DF5BE0C962E5596A2ECC493 -DCOMPRESSION_METHOD=7z -DONE_CLICK -DRUN_AFTER_FINISH -DSHORTCUT_NAME=Angular Electron Dream Starter -DUNINSTALL_DISPLAY_NAME=Angular Electron Dream Starter 7.0.0 -DCOMPRESS=auto -DBUILD_UNINSTALLER -DUNINSTALLER_OUT_FILE=C:\Users\desk\AppData\Local\Temp\temp-files-6h01yk\1-uninstaller.exe -XOutFile "C:\Users\desk\Downloads\angular-electron-dream-starter\packages\Angular Electron Dream Starter Setup 7.0.0.exe" -XVIProductVersion 7.0.0.0 -XVIAddVersionKey /LANG=1033 ProductName "Angular Electron Dream Starter" -XVIAddVersionKey /LANG=1033 ProductVersion "7.0.0" -XVIAddVersionKey /LANG=1033 LegalCopyright "Copyright © 2017 Colin Skow" -XVIAddVersionKey /LANG=1033 FileDescription "An Angular 2 Electron Starter kit featuring Webpack, Angular 2 (Router, Http, Forms, Services, ngrx, Tests, E2E, Coverage), Karma, Protractor, Jasmine, Istanbul, and TypeScript" -XVIAddVersionKey /LANG=1033 FileVersion "7.0.0" -XVIAddVersionKey /LANG=1033 CompanyName "Colin Skow" -XUnicode true -XSetCompressor lzma - +330ms
electron-builder cwd: C:\Users\desk\Downloads\angular-electron-dream-starter\node_modules\electron-builder\templates\nsis +15ms
electron-builder makensis.exe (8580) exited with exit code 0 +1s
electron-builder Executing C:\Users\desk\Downloads\angular-electron-dream-starter\packages\Angular Electron Dream Starter Setup 7.0.0.exe +15ms
electron-builder Spawning C:\Users\desk\AppData\Local\electron-builder\cache\nsis\nsis-3.0.2.1\Bin\makensis.exe -WX -DAPP_ID=com.electron.angular-electron-dream-starter -DAPP_GUID=048e184b-f508-5554-89f6-b0956f1e25e5 -DPRODUCT_NAME=Angular Electron Dream Starter -DPRODUCT_FILENAME=Angular Electron Dream Starter -DAPP_FILENAME=angular-electron-dream-starter -DAPP_DESCRIPTION=An Angular 2 Electron Starter kit featuring Webpack, Angular 2 (Router, Http, Forms, Services, ngrx, Tests, E2E, Coverage), Karma, Protractor, Jasmine, Istanbul, and TypeScript -DVERSION=7.0.0 -DPROJECT_DIR=C:\Users\desk\Downloads\angular-electron-dream-starter -DBUILD_RESOURCES_DIR=C:\Users\desk\Downloads\angular-electron-dream-starter\src\resources -DCOMPANY_NAME=Colin Skow -DAPP_PRODUCT_FILENAME=Angular Electron Dream Starter -DMUI_ICON=C:\Users\desk\Downloads\angular-electron-dream-starter\src\resources\icon.ico -DMUI_UNICON=C:\Users\desk\Downloads\angular-electron-dream-starter\src\resources\icon.ico -DAPP_64=C:\Users\desk\Downloads\angular-electron-dream-starter\packages\angular-electron-dream-starter-7.0.0-x64.nsis.7z -DAPP_64_NAME=angular-electron-dream-starter-7.0.0-x64.nsis.7z -DAPP_64_HASH=58720A65E66F2EEDA88F91D00F5E52266657C46B4AA7A34AE5237597238496520DDB4D15D912BFF16C773B54C0AAC1E5445D67933DF5BE0C962E5596A2ECC493 -DCOMPRESSION_METHOD=7z -DONE_CLICK -DRUN_AFTER_FINISH -DSHORTCUT_NAME=Angular Electron Dream Starter -DUNINSTALL_DISPLAY_NAME=Angular Electron Dream Starter 7.0.0 -DCOMPRESS=auto -DUNINSTALLER_OUT_FILE=C:\Users\desk\AppData\Local\Temp\temp-files-6h01yk\1-uninstaller.exe -XOutFile "C:\Users\desk\Downloads\angular-electron-dream-starter\packages\Angular Electron Dream Starter Setup 7.0.0.exe" -XVIProductVersion 7.0.0.0 -XVIAddVersionKey /LANG=1033 ProductName "Angular Electron Dream Starter" -XVIAddVersionKey /LANG=1033 ProductVersion "7.0.0" -XVIAddVersionKey /LANG=1033 LegalCopyright "Copyright © 2017 Colin Skow" -XVIAddVersionKey /LANG=1033 FileDescription "An Angular 2 Electron Starter kit featuring Webpack, Angular 2 (Router, Http, Forms, Services, ngrx, Tests, E2E, Coverage), Karma, Protractor, Jasmine, Istanbul, and TypeScript" -XVIAddVersionKey /LANG=1033 FileVersion "7.0.0" -XVIAddVersionKey /LANG=1033 CompanyName "Colin Skow" -XUnicode true -XSetCompressor lzma - +672ms
electron-builder cwd: C:\Users\desk\Downloads\angular-electron-dream-starter\node_modules\electron-builder\templates\nsis +16ms
electron-builder Async task error: Error: C:\Users\desk\AppData\Local\electron-builder\cache\nsis\nsis-3.0.2.1\Bin\makensis.exe exited with code 1
electron-builder Error output:
electron-builder Can't open output file
electron-builder Error - aborting creation process
electron-builder
electron-builder at ChildProcess.childProcess.once.code (C:\Users\desk\Downloads\angular-electron-dream-starter\node_modules\builder-util\src\util.ts:200:14)
electron-builder at Object.onceWrapper (events.js:318:30)
electron-builder at emitTwo (events.js:125:13)
electron-builder at ChildProcess.emit (events.js:213:7)
electron-builder at maybeClose (internal/child_process.js:927:16)
electron-builder at Socket.stream.socket.on (internal/child_process.js:348:11)
electron-builder at emitOne (events.js:115:13)
electron-builder at Socket.emit (events.js:210:7)
electron-builder at Pipe._handle.close [as _onclose] (net.js:545:12) +1s
Error: C:\Users\desk\AppData\Local\electron-builder\cache\nsis\nsis-3.0.2.1\Bin\makensis.exe exited with code 1
Error output:
Can't open output file
Error - aborting creation process
at ChildProcess.childProcess.once.code (C:\Users\desk\Downloads\angular-electron-dream-starter\node_modules\builder-util\src\util.ts:200:14)
at Object.onceWrapper (events.js:318:30)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:927:16)
at Socket.stream.socket.on (internal/child_process.js:348:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:545:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! angular-electron-dream-starter@7.0.0 package:windows: `build --win --x64`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the angular-electron-dream-starter@7.0.0 package:windows script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I just tried exactly what you did. Windows 10, Node 6.10. Fresh clone of repo. It worked just fine for me.
"Can't open output file" appears to be some sort of permission error on your file system. Perhaps try with Node 6 and see if that helps? Also make sure the packages folder is clean before you start. Instead of "pakcages/win" it looks like the new directory is "win-unpacked."
just a side note, i find rimraf much more convenient and have installed it globally with proper permissions making it available in my windows path
environment variable and i am not experiencing this on windows 10 x64 enterprise
Hi all, I actually had this problem on and off every time and most of the time it worked after 5-10tries of fails. I changed "pakcages/win" to "win-unpacked" in "package:windows": "rimraf packages/win/* && build --win --x64"
to "package:windows": "rimraf packages/win-unpacked/* && build --win --x64"
and delete packages, dist folder and build:prod
, package:windows
with no success result.
I will try Node 6.10 later. I am currently using node version is v8.5.0
@Kaffiend Hi, mind guiding me the install globally and your proper permissions?
@celestale sure its simple.
npm i -g rimraf
any powershell or windows cmd instances you have open close them and reopen, node by default should add a global flagged install to path. But you may need to run CMD or Powershell as Administrator when you run the install command.
This usually installs to
C:\Users\UserNameHere\AppData\Roaming\npm
but i have seen packages install to
C:\Users\UserNameHere\npm
as well.
to add to path if either are not there already just run
SETX /M PATH "%PATH%;C:\Users\UserNameHere\AppData\Roaming\npm
or what ever path you need in place of the path after ;
in the command
the /M switch makes it a system level entry to the PATH variable which is in turn run at system level permissions
@Kaffiend Hi, great explanation! I have installed it globally and follow your SETX
instructions and ran the package:windows again with no success.
Can I know if your package.json contains the same script "package:windows": "rimraf packages/win/* && build --win --x64"
. Because colin said that it should be win-unpacked instead of packages/win. I am confused.
I also tried manually deleting the package folder before i ran package:windows.
@colinskow tried with node 6 and was unable to do npm start. Appreciated your help thanks!
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! angular-electron-dream-starter@7.0.0 start: `npm run clean:dev && npm run prep:dev && node ./config/electron-dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-electron-dream-starter@7.0.0 start script 'npm run clean:dev && npm run prep:dev && node ./config/electron-dev'.
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 angular-electron-dream-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run clean:dev && npm run prep:dev && node ./config/electron-dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-electron-dream-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-electron-dream-starter
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\desk\Downloads\angular-electron-dream-starter\npm-debug.log
All I can tell you is that it is working on both my Mac and Windows desktop. Did you do npm run clean
and npm install
again after changing the Node version? Native dependency builds are not compatible across Node versions.
At this point this is an issue to file with Electron Builder. This repo is working as expected. You are having problems with a dependency.
Alright thanks for your help! Cheers @colinskow
Hi Colin,
First off. Great job man, thanks so much for creating this!!!
Had same issue as @celestale on a surface pro 3 up-to-date. Stopped after first failure on package creation, then tried dev/prod/aot builds same failure basically.
Tried your suggestion to npm clean and reinstall. This fixed everything: builds, packages, tests, etc.
Fix found in builder-util:
It turned out that node_modules\builder-util
do not contain the folder src
. Instead it contains folder out
.
Quoted from Error:
node_modules\builder-util\src\util.ts:200:14
.
It is trying to access src
folder.
Currently, I manually created the src
folder and I was able to run package:windows
with no problem. I suppose this is an electron-builder issue?
Tried manual install npm install builder-util
version "_id": "builder-util@2.0.7"
but still no src
folder. out
folder was installed in node_modules/builder-util
Current version:
"_id": "electron-builder@19.34.0"
Definitely file that bug directly with electron-builder
.
I'm submitting a ... [ * ] bug report [ ] feature request [ ] question about the decisions made in the repository
What is the current behavior? npm run package:windows fails with Exit status 4294967295
Please tell us about your environment: i ran the latest source codes of angular-electron-dream-starter@7.0.0 without any changes
Attached debug log