electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.68k stars 1.74k forks source link

Error during packaging (13 verbose stack Exit status 4294967295) #2103

Closed celestale closed 7 years ago

celestale commented 7 years ago
`0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'package:windows' ]
2 info using npm@5.3.0
3 info using node@v8.2.1
4 verbose run-script [ 'prepackage:windows',
4 verbose run-script   'package:windows',
4 verbose run-script   'postpackage:windows' ]
5 info lifecycle angular-electron@2.2.2~prepackage:windows: angular-electron@2.2.2
6 info lifecycle angular-electron@2.2.2~package:windows: angular-electron@2.2.2
7 verbose lifecycle angular-electron@2.2.2~package:windows: unsafe-perm in lifecycle true
8 verbose lifecycle angular-electron@2.2.2~package:windows: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\l\Documents\projects\angular-electronnode_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\WebEx\Productivity Tools;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\IVI Foundation\VISA\Win64\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\ktvisa;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\bin;C:\Program Files (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\winnt\agvisa;C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v716\runtime\win32;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\nodejs\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\WebEx\PTools020000000;C:\Program Files (x86)\Sennheiser\SoftphoneSDK\;C:\Users\l\AppData\Local\Microsoft\WindowsApps;C:\Users\l\AppData\Local\atom\bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\l\AppData\Roaming\npm
9 verbose lifecycle angular-electron@2.2.2~package:windows: CWD: C:\Users\l\Documents\projects\angular-electron
10 silly lifecycle angular-electron@2.2.2~package:windows: Args: [ '/d /s /c', 'rimraf packages/win/* && build --win --x64' ]
11 silly lifecycle angular-electron@2.2.2~package:windows: Returned: code: 4294967295  signal: null
12 info lifecycle angular-electron@2.2.2~package:windows: Failed to exec package:windows script
13 verbose stack Error: angular-electron@2.2.2 package:windows: `rimraf packages/win/* && build --win --x64`
13 verbose stack Exit status 4294967295
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:289:16)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at EventEmitter.emit (events.js:213:7)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at ChildProcess.emit (events.js:213:7)
13 verbose stack     at maybeClose (internal/child_process.js:921:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid angular-electron@2.2.2
15 verbose cwd C:\Users\l\Documents\projects\angular-electron
16 verbose Windows_NT 10.0.14393
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "package:windows"
18 verbose node v8.2.1
19 verbose npm  v5.3.0
20 error code ELIFECYCLE
21 error errno 4294967295
22 error angular-electron@2.2.2 package:windows: `rimraf packages/win/* && build --win --x64`
22 error Exit status 4294967295
23 error Failed at the angular-electron@2.2.2 package:windows script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 4294967295, true ]
`

Package json

  "scripts": {
    "build:aot": "npm run clean:build && npm run clean:aot && npm run prep:dist && npm-run-all -p build:main:prod build:renderer:aot:prod",
    "build:dev:watch": "npm run clean:build && npm-run-all -p -r \"build:main:dev -- --watch\" \"build:renderer:dev -- --watch\"",
    "build:dev": "npm run clean:build && npm run prep:dist && npm-run-all -p build:main:dev build:renderer:dev",
    "build:main:dev": "webpack --config config/webpack.electron.js --progress --profile",
    "build:main:prod": "webpack --config config/webpack.electron.js --progress --profile",
    "build:prod": "npm run clean:build && npm run prep:dist && npm-run-all -p build:main:prod build:renderer:prod",
    "build:renderer:aot:prod": "webpack --config config/webpack.prod.js  --progress --profile --bail",
    "build:renderer:dev": "webpack --config config/webpack.dev.js --progress --profile",
    "build:renderer:prod": "webpack --config config/webpack.prod.js  --progress --profile --bail",
    "build": "npm run build:prod",
    "launch": "electron ./dist",
    "package": "npm run clean:packages && build -mwl --x64",
    "package:linux": "rimraf packages/linux/* && build --linux --x64",
    "package:mac": "rimraf packages/mac/* && build --macos --x64",
    "package:windows": "rimraf packages/win/* && build --win --x64",
  },
  "dependencies": {
    "electron-devtools-installer": "^2.2.0",
    "rxjs": "~5.4.0",
    "@angular/cdk": "^2.0.0-beta.10"
  },
  "devDependencies": {
    "@swimlane/ngx-datatable": "10.2.3",
    "@types/chart.js": "^2.6.4",
    "@angular/animations": "^4.3.5",
    "@angular/common": "^4.3.5",
    "@angular/compiler": "^4.3.5",
    "@angular/compiler-cli": "^4.3.5",
    "@angular/core": "^4.3.5",
    "@angular/forms": "^4.3.5",
    "@angular/http": "^4.3.5",
    "@angular/language-service": "^4.3.5",
    "@angular/platform-browser": "^4.3.5",
    "@angular/platform-browser-dynamic": "^4.3.5",
    "@angular/platform-server": "^4.3.5",
    "@angular/router": "^4.3.5",
    "@angularclass/conventions-loader": "^1.0.13",
    "@angularclass/hmr": "~1.2.2",
    "@angularclass/hmr-loader": "~3.0.2",
    "@ngrx/core": "^1.2.0",
    "@ngrx/effects": "^2.0.3",
    "@ngrx/router-store": "^1.2.6",
    "@ngrx/store": "^2.2.2",
    "@ngrx/store-devtools": "^3.2.4",
    "@types/chai": "^4.0.0",
    "@types/chai-as-promised": "^0.0.31",
    "@types/hammerjs": "^2.0.34",
    "@types/jasmine": "^2.5.51",
    "@types/mocha": "^2.2.41",
    "@types/node": "^7.0.28",
    "@types/source-map": "^0.5.0",
    "@types/uglify-js": "^2.6.29",
    "@types/webdriverio": "^4.7.0",
    "@types/webpack": "^2.2.15",
    "add-asset-html-webpack-plugin": "^2.0.1",
    "angular2-template-loader": "^0.6.2",
    "assets-webpack-plugin": "^3.5.1",
    "awesome-typescript-loader": "~3.1.3",
    "chai": "^4.0.2",
    "chai-as-promised": "^6.0.0",
    "codelyzer": "~3.0.1",
    "copy-webpack-plugin": "^4.0.1",
    "core-js": "^2.4.1",
    "css-loader": "^0.28.4",
    "devtron": "^1.4.0",
    "electron": "~1.7.2",
    "electron-builder": "^18.6.1",
    "electron-connect": "^0.6.1",
    "electron-connect-webpack-plugin": "^0.1.1",
    "electron-debug": "^1.1.0",
    "exports-loader": "^0.6.4",
    "expose-loader": "^0.7.3",
    "express": "^4.15.3",
    "extract-text-webpack-plugin": "~2.1.0",
    "file-loader": "^0.11.2",
    "find-root": "^1.0.0",
    "gh-pages": "^1.0.0",
    "html-webpack-plugin": "^2.28.0",
    "imports-loader": "^0.7.1",
    "istanbul-instrumenter-loader": "2.0.0",
    "jasmine-core": "^2.6.2",
    "json-loader": "^0.5.4",
    "karma": "^1.7.0",
    "karma-chrome-launcher": "^2.1.1",
    "karma-coverage": "^1.1.1",
    "karma-electron": "^5.2.1",
    "karma-jasmine": "^1.1.0",
    "karma-mocha-reporter": "^2.2.3",
    "karma-remap-coverage": "^0.1.4",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-webpack": "~2.0.3",
    "mocha": "^3.4.2",
    "ncp": "^2.0.0",
    "ng-router-loader": "^2.1.0",
    "ngc-webpack": "~2.0.0",
    "ngrx-store-freeze": "^0.1.9",
    "ngrx-store-logger": "^0.1.8",
    "node-sass": "^4.5.3",
    "npm-run-all": "^4.0.2",
    "optimize-js-plugin": "0.0.4",
    "parse5": "^3.0.2",
    "raw-loader": "0.5.1",
    "reflect-metadata": "^0.1.10",
    "rimraf": "~2.6.1",
    "sass-loader": "^6.0.5",
    "script-ext-html-webpack-plugin": "^1.8.1",
    "source-map-loader": "^0.2.1",
    "spectron": "~3.7.0",
    "string-replace-loader": "1.2.0",
    "style-loader": "^0.18.2",
    "to-string-loader": "^1.1.5",
    "ts-helpers": "1.1.2",
    "ts-node": "^3.0.6",
    "tslib": "^1.7.1",
    "tslint": "~5.4.3",
    "tslint-loader": "^3.5.3",
    "typedoc": "^0.7.1",
    "typescript": "^2.5.2",
    "url-loader": "^0.5.8",
    "v8-lazy-parse-webpack-plugin": "^0.3.0",
    "webpack": "~2.6.1",
    "webpack-dev-middleware": "^1.10.2",
    "webpack-dll-bundles-plugin": "^1.0.0-beta.5",
    "webpack-hot-middleware": "^2.18.0",
    "webpack-md5-hash": "^0.0.5",
    "webpack-merge": "~4.1.0",
    "webpack-node-externals": "^1.6.0",
    "write-file-webpack-plugin": "^4.0.2",
    "zone.js": "~0.8.11"
  },
  "build": {
    "appId": "com.electron.angular-electron",
    "directories": {
      "buildResources": "src/resources",
      "output": "packages",
      "app": "dist"
    },
    "mac": {
      "category": "public.app-category.graphics-design",
      "target": [
        "dmg"
      ]
    },
    "linux": {
      "target": [
        "AppImage",
        "snap"
      ]
    },
    "asar": true
  },

I was able to build and publish packages few days back with this error occurring frequently. I just kept retrying npm run package:windows till it packs the packages. But now it doesn't work anymore. Appreciate if anyone could assist me in this.

celestale commented 7 years ago

Does packaging relies on internet connection speed?

develar commented 7 years ago

Only for code sign. Please try 19.30.4. Please set env DEBUG=electron-builder and attach log of the terminal output if error still actual.

celestale commented 7 years ago

Thanks for reply. Where can I set env debug=...?

develar commented 7 years ago

On Windows the environment variable is set using the set command.

set DEBUG=electron-builder

celestale commented 7 years ago

Thanks for your advice. I will test it out when I get back to my desktop! On the other hand, do you think that a slow network connection would affect? Because I tried tested it on my home network with no problems. But with another network, it fails.

celestale commented 7 years ago

Error still actual. Attached is the log for 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
> rimraf packages/win/* && 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) +1s
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 +3s

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 (15708) 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 CK --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 CK --set-icon C:\Users\desk\Downloads\angular-electron-dream-starter\src\resources\icon.ico +1s
wine&sign: 1s 225ms
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 . +1s
  electron-builder cwd: C:\Users\desk\Downloads\angular-electron-dream-starter\packages\win-unpacked +0ms
  electron-builder 7za.exe (1368) exited with exit code 0 +43s
nsis package, x64: 43s 100ms
  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=CK -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-c7KFSY\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 desk" -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 "CK" -XUnicode true -XSetCompressor lzma - +241ms
  electron-builder cwd: C:\Users\desk\Downloads\angular-electron-dream-starter\node_modules\electron-builder\templates\nsis +5ms
  electron-builder makensis.exe (13460) exited with exit code 0 +929ms
  electron-builder Executing C:\Users\desk\Downloads\angular-electron-dream-starter\packages\Angular Electron Dream Starter Setup 7.0.0.exe  +3ms
  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=CK -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-c7KFSY\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 CK" -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 "CK" -XUnicode true -XSetCompressor lzma - +860ms
  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: `rimraf packages/win/* && 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.
celestale commented 7 years ago

Attached is the error log for just running 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.
celestale commented 7 years ago

Any assistance on this please?

develar commented 7 years ago

Could you please try to move angular-electron-dream-starter from Downloads to another dir and build?

celestale commented 7 years ago

Hi @develar ,

Now tested with latest electron-builder 19.32.0 and Documents dir

C:\Users\desk\Documents\projects\electronb>set DEBUG=electron-builder

C:\Users\desk\Documents\projects\electronb>npm run package:windows

> electronb@2.2.2 package:windows C:\Users\desk\Documents\projects\electronb
> rimraf packages/win-unpacked/* && build --win --x64

??  --draft and --prerelease is deprecated, please set releaseType (http://electron.build/configuration/publish#GithubOptions-releaseType) in the GitHub publish options instead
electron-builder 19.32.0
  electron-builder Effective config:
  electron-builder appId: com.electron.electronb
  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\Documents\projects\electronb\package.json, app: C:\Users\desk\Documents\projects\electronb\dist\package.json) +639ms
No native production dependencies
Packaging for win32 x64 using electron 1.7.6 to packages\win-unpacked
  electron-builder Spawning C:\Users\desk\Documents\projects\electronb\node_modules\7zip-bin-win\x64\7za.exe x -bd C:\Users\desk\AppData\Local\electron\Cache\electron-v1.7.6-win32-x64.zip -aoa -oC:\Users\desk\Documents\projects\electronb\packages\win-unpacked +811ms

7-Zip (a) 17.01 beta (x64) : Copyright (c) 1999-2017 Igor Pavlov : 2017-08-28

Scanning the drive for archives:
1 file, 53897098 bytes (52 MiB)

Extracting archive: C:\Users\desk\AppData\Local\electron\Cache\electron-v1.7.6-win32-x64.zip
--
Path = C:\Users\desk\AppData\Local\electron\Cache\electron-v1.7.6-win32-x64.zip
Type = zip
Physical Size = 53897098

Everything is Ok

Files: 117
Size:       138472204
Compressed: 53897098
  electron-builder 7za.exe (10564) 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\Documents\projects\electronb\packages\win-unpacked\Electro.exe --set-version-string FileDescription Electro --set-version-string ProductName Electro --set-version-string LegalCopyright Copyright � 2017  L --set-file-version 2.2.2 --set-product-version 2.2.2.0 --set-version-string InternalName Electro --set-version-string OriginalFilename  --set-version-string CompanyName  L --set-icon C:\Users\desk\Documents\projects\electronb\src\resources\icon.ico +1s
wine&sign: 0s 930ms
Building nsis installer (x64)
  electron-builder Spawning C:\Users\desk\Documents\projects\electronb\node_modules\7zip-bin-win\x64\7za.exe a -bd -mx=9 -mtc=off -mtm=off -mta=off C:\Users\desk\Documents\projects\electronb\packages\electronb-2.2.2-x64.nsis.7z . +959ms
  electron-builder cwd: C:\Users\desk\Documents\projects\electronb\packages\win-unpacked +3ms
  electron-builder 7za.exe (4512) exited with exit code 0 +42s
nsis package, x64: 42s 128ms
  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.electronb -DAPP_GUID=4a41a147-f6cf-51c3-9fae-7e776c23fb45 -DPRODUCT_NAME=Electro -DPRODUCT_FILENAME=Electro -DAPP_FILENAME=electronb -DAPP_DESCRIPTION=Electron Builder Example -DVERSION=2.2.2 -DPROJECT_DIR=C:\Users\desk\Documents\projects\electronb -DBUILD_RESOURCES_DIR=C:\Users\desk\Documents\projects\electronb\src\resources -DCOMPANY_NAME= L -DAPP_PRODUCT_FILENAME=Electro -DMUI_ICON=C:\Users\desk\Documents\projects\electronb\src\resources\icon.ico -DMUI_UNICON=C:\Users\desk\Documents\projects\electronb\src\resources\icon.ico -DAPP_64=C:\Users\desk\Documents\projects\electronb\packages\electronb-2.2.2-x64.nsis.7z -DAPP_64_NAME=electronb-2.2.2-x64.nsis.7z -DAPP_64_HASH=10BEB71CEB10F07127E8A4A37CCBA1E270B8CE9438C10844DEB65C4AE3AD10347D459AE7D6E4E75139FA66917493E05D08C9A4847CA27CAC7D8FC18305E2D753 -DCOMPRESSION_METHOD=7z -DONE_CLICK -DRUN_AFTER_FINISH -DSHORTCUT_NAME=Electro -DUNINSTALL_DISPLAY_NAME=Electro 2.2.2 -DCOMPRESS=auto -DBUILD_UNINSTALLER -DUNINSTALLER_OUT_FILE=C:\Users\desk\AppData\Local\Temp\temp-files-N5lj4S\1-uninstaller.exe -XOutFile "C:\Users\desk\Documents\projects\electronb\packages\Electro Setup 2.2.2.exe" -XVIProductVersion 2.2.2.0 -XVIAddVersionKey /LANG=1033 ProductName "Electro" -XVIAddVersionKey /LANG=1033 ProductVersion "2.2.2" -XVIAddVersionKey /LANG=1033 LegalCopyright "Copyright � 2017  L" -XVIAddVersionKey /LANG=1033 FileDescription "Electron Builder Example" -XVIAddVersionKey /LANG=1033 FileVersion "2.2.2" -XVIAddVersionKey /LANG=1033 CompanyName " L" -XUnicode true -XSetCompressor lzma - +249ms
  electron-builder cwd: C:\Users\desk\Documents\projects\electronb\node_modules\electron-builder\templates\nsis +4ms
  electron-builder makensis.exe (1096) exited with exit code 0 +825ms
  electron-builder Executing C:\Users\desk\Documents\projects\electronb\packages\Electro Setup 2.2.2.exe  +3ms
  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.electronb -DAPP_GUID=4a41a147-f6cf-51c3-9fae-7e776c23fb45 -DPRODUCT_NAME=Electro -DPRODUCT_FILENAME=Electro -DAPP_FILENAME=electronb -DAPP_DESCRIPTION=Electron Builder Example -DVERSION=2.2.2 -DPROJECT_DIR=C:\Users\desk\Documents\projects\electronb -DBUILD_RESOURCES_DIR=C:\Users\desk\Documents\projects\electronb\src\resources -DCOMPANY_NAME= L -DAPP_PRODUCT_FILENAME=Electro -DMUI_ICON=C:\Users\desk\Documents\projects\electronb\src\resources\icon.ico -DMUI_UNICON=C:\Users\desk\Documents\projects\electronb\src\resources\icon.ico -DAPP_64=C:\Users\desk\Documents\projects\electronb\packages\electronb-2.2.2-x64.nsis.7z -DAPP_64_NAME=electronb-2.2.2-x64.nsis.7z -DAPP_64_HASH=10BEB71CEB10F07127E8A4A37CCBA1E270B8CE9438C10844DEB65C4AE3AD10347D459AE7D6E4E75139FA66917493E05D08C9A4847CA27CAC7D8FC18305E2D753 -DCOMPRESSION_METHOD=7z -DONE_CLICK -DRUN_AFTER_FINISH -DSHORTCUT_NAME=Electro -DUNINSTALL_DISPLAY_NAME=Electro 2.2.2 -DCOMPRESS=auto -DUNINSTALLER_OUT_FILE=C:\Users\desk\AppData\Local\Temp\temp-files-N5lj4S\1-uninstaller.exe -XOutFile "C:\Users\desk\Documents\projects\electronb\packages\Electro Setup 2.2.2.exe" -XVIProductVersion 2.2.2.0 -XVIAddVersionKey /LANG=1033 ProductName "Electro" -XVIAddVersionKey /LANG=1033 ProductVersion "2.2.2" -XVIAddVersionKey /LANG=1033 LegalCopyright "Copyright � 2017  L" -XVIAddVersionKey /LANG=1033 FileDescription "Electron Builder Example" -XVIAddVersionKey /LANG=1033 FileVersion "2.2.2" -XVIAddVersionKey /LANG=1033 CompanyName " L" -XUnicode true -XSetCompressor lzma - +686ms
  electron-builder cwd: C:\Users\desk\Documents\projects\electronb\node_modules\electron-builder\templates\nsis +5ms
  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\Documents\projects\electronb\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:547: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\Documents\projects\electronb\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:547:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! electronb@2.2.2 package:windows: `rimraf packages/win-unpacked/* && build --win --x64`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the electronb@2.2.2 package:windows script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
celestale commented 7 years ago

@develar Been having Can't open output file error on all versions i tested on. I tried to install and rebuild many clean versions of the code but failed.

Here's mine package.json

  "scripts": {
    "build:aot": "npm run clean:build && npm run clean:aot && npm run prep:dist && npm-run-all -p build:main:prod build:renderer:aot:prod",
    "build:dev:watch": "npm run clean:build && npm-run-all -p -r \"build:main:dev -- --watch\" \"build:renderer:dev -- --watch\"",
    "build:dev": "npm run clean:build && npm run prep:dist && npm-run-all -p build:main:dev build:renderer:dev",
    "build:main:dev": "webpack --config config/webpack.electron.js --progress --profile",
    "build:main:prod": "webpack --config config/webpack.electron.js --progress --profile",
    "build:prod": "npm run clean:build && npm run prep:dist && npm-run-all -p build:main:prod build:renderer:prod",
    "build:renderer:aot:prod": "webpack --config config/webpack.prod.js  --progress --profile --bail",
    "build:renderer:dev": "webpack --config config/webpack.dev.js --progress --profile",
    "build:renderer:prod": "webpack --config config/webpack.prod.js  --progress --profile --bail",
    "build": "npm run build:prod",
    "ci:aot": "npm run test && npm run build:aot && npm run e2e",
    "ci:jit": "npm run test && npm run build:prod && npm run e2e",
    "ci:nobuild": "npm run test && npm run e2e",
    "ci:testall": "npm run test && npm run build:prod && npm run e2e && npm run build:aot && npm run e2e",
    "ci:travis": "npm run test && npm run build:dev && npm run e2e && npm run build:prod && npm run e2e && npm run build:aot && npm run e2e",
    "ci": "npm run ci:testall",
    "clean:aot": "rimraf compiled",
    "clean:appdata": "electron config/clean-app-data",
    "clean:build": "rimraf dist dev compiled *.temp.json",
    "clean:dev": "rimraf dev",
    "clean:dist": "rimraf dist",
    "clean:dll": "rimraf dll",
    "clean:install": "npm set progress=false && npm install",
    "clean:packages": "rimraf packages",
    "clean": "npm cache clean && npm run rimraf -- node_modules node_modules_electron doc coverage dist dev compiled dll packages npm-debug.log *.temp.json",
    "docker": "docker",
    "docs": "npm run typedoc -- --options typedoc.json --exclude '**/*.spec.ts' ./src/",
    "e2e:live": "node ./config/e2e-live",
    "e2e": "mocha --require ts-node/register \"src/**/*.e2e.ts\" --timeout 10000",
    "github-deploy:dev": "webpack --config config/webpack.github-deploy.js --progress --profile --env.githubDev",
    "github-deploy:prod": "webpack --config config/webpack.github-deploy.js --progress --profile --env.githubProd",
    "github-deploy": "npm run github-deploy:dev",
    "install-app-deps": "node ./config/install-app-deps",
    "launch": "electron ./dist",
    "lint": "tslint \"src/**/*.ts\"",
    "package": "npm run clean:packages && build -mwl --x64",
    "package:linux": "rimraf packages/linux/* && build --linux --x64",
    "package:mac": "rimraf packages/mac/* && build --macos --x64",
    "package:windows": "rimraf packages/win-unpacked/* && build --win --x64",
    "postinstall": "node ./config/install-app-deps",
    "postversion": "git push && git push --tags",
    "preclean:install": "npm run clean",
    "prep:dev": "ncp node_modules_electron dev",
    "prep:dist": "ncp node_modules_electron dist && rimraf dist/yarn.lock",
    "rimraf": "rimraf",
    "start:main:dev": "webpack --config config/webpack.electron.js --env.live --progress --profile --watch",
    "start": "npm run clean:dev && npm run prep:dev && node ./config/electron-dev",
    "test": "npm run lint && karma start",
    "tslint": "tslint",
    "typedoc": "typedoc",
    "watch:test": "npm run test -- --auto-watch --no-single-run",
    "watch": "npm run build:dev:watch",
    "webpack": "webpack"
  },
 "dependencies": {
    "electron-devtools-installer": "^2.2.0",
    "rxjs": "~5.4.0"
  },
  "devDependencies": {
    "@angular/animations": "^4.3.5",
    "@angular/cdk": "^2.0.0-beta.10",
    "@angular/common": "^4.3.5",
    "@angular/compiler": "^4.3.5",
    "@angular/compiler-cli": "^4.3.5",
    "@angular/core": "^4.3.5",
    "@angular/forms": "^4.3.5",
    "@angular/http": "^4.3.5",
    "@angular/language-service": "^4.3.5",
    "@angular/platform-browser": "^4.3.5",
    "@angular/platform-browser-dynamic": "^4.3.5",
    "@angular/platform-server": "^4.3.5",
    "@angular/router": "^4.3.5",
    "@angularclass/conventions-loader": "^1.0.13",
    "@angularclass/hmr": "~1.2.2",
    "@angularclass/hmr-loader": "~3.0.2",
    "@ngrx/core": "^1.2.0",
    "@ngrx/effects": "^2.0.3",
    "@ngrx/router-store": "^1.2.6",
    "@ngrx/store": "^2.2.2",
    "@ngrx/store-devtools": "^3.2.4",
    "@swimlane/ngx-datatable": "10.2.3",
    "@types/chai": "^4.0.0",
    "@types/chai-as-promised": "^0.0.31",
    "@types/hammerjs": "^2.0.34",
    "@types/jasmine": "^2.5.51",
    "@types/mocha": "^2.2.41",
    "@types/node": "^7.0.28",
    "@types/source-map": "^0.5.0",
    "@types/uglify-js": "^2.6.29",
    "@types/webdriverio": "^4.7.0",
    "@types/webpack": "^2.2.15",
    "add-asset-html-webpack-plugin": "^2.0.1",
    "angular2-template-loader": "^0.6.2",
    "assets-webpack-plugin": "^3.5.1",
    "awesome-typescript-loader": "~3.2.3",
    "chai": "^4.0.2",
    "chai-as-promised": "^7.1.1",
    "codelyzer": "~3.2.0",
    "copy-webpack-plugin": "^4.0.1",
    "core-js": "^2.4.1",
    "css-loader": "^0.28.4",
    "devtron": "^1.4.0",
    "electron": "~1.7.2",
    "electron-builder": "19.32.0",
    "electron-connect": "^0.6.1",
    "electron-connect-webpack-plugin": "^0.1.1",
    "electron-debug": "^1.1.0",
    "exports-loader": "^0.6.4",
    "expose-loader": "^0.7.3",
    "express": "^4.15.3",
    "extract-text-webpack-plugin": "~2.1.0",
    "file-loader": "^0.11.2",
    "find-root": "^1.0.0",
    "gh-pages": "^1.0.0",
    "html-webpack-plugin": "^2.28.0",
    "imports-loader": "^0.7.1",
    "istanbul-instrumenter-loader": "~3.0.0",
    "jasmine-core": "^2.6.2",
    "json-loader": "^0.5.4",
    "karma": "^1.7.0",
    "karma-chrome-launcher": "^2.1.1",
    "karma-coverage": "^1.1.1",
    "karma-electron": "^5.2.1",
    "karma-jasmine": "^1.1.0",
    "karma-mocha-reporter": "^2.2.3",
    "karma-remap-coverage": "^0.1.4",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-webpack": "~2.0.3",
    "mocha": "^3.4.2",
    "ncp": "^2.0.0",
    "ng-router-loader": "^2.1.0",
    "ngc-webpack": "~2.0.0",
    "ngrx-store-freeze": "^0.1.9",
    "ngrx-store-logger": "^0.1.8",
    "node-sass": "^4.5.3",
    "npm-run-all": "^4.0.2",
    "optimize-js-plugin": "0.0.4",
    "parse5": "^3.0.2",
    "raw-loader": "0.5.1",
    "reflect-metadata": "^0.1.10",
    "rimraf": "~2.6.1",
    "sass-loader": "^6.0.5",
    "script-ext-html-webpack-plugin": "^1.8.1",
    "source-map-loader": "^0.2.1",
    "spectron": "~3.7.0",
    "string-replace-loader": "1.2.0",
    "style-loader": "^0.18.2",
    "to-string-loader": "^1.1.5",
    "ts-helpers": "1.1.2",
    "ts-node": "^3.0.6",
    "tslib": "^1.7.1",
    "tslint": "~5.7.0",
    "tslint-loader": "^3.5.3",
    "typedoc": "^0.7.1",
    "typescript": "^2.5.2",
    "url-loader": "^0.5.8",
    "v8-lazy-parse-webpack-plugin": "^0.3.0",
    "webpack": "~2.6.1",
    "webpack-dev-middleware": "^1.10.2",
    "webpack-dll-bundles-plugin": "^1.0.0-beta.5",
    "webpack-hot-middleware": "^2.18.0",
    "webpack-md5-hash": "^0.0.5",
    "webpack-merge": "~4.1.0",
    "webpack-node-externals": "^1.6.0",
    "write-file-webpack-plugin": "^4.0.2",
    "zone.js": "~0.8.11"
  },
"build": {
    "appId": "com.electron.testing",
    "directories": {
      "buildResources": "src/resources",
      "output": "packages",
      "app": "dist"
    },
    "mac": {
      "category": "public.app-category.graphics-design",
      "target": [
        "dmg"
      ]
    },
    "linux": {
      "target": [
        "AppImage",
        "snap"
      ]
    },
    "asar": true
  },

Any tips to fix this please?

develar commented 7 years ago

@celestale Please try 19.32.2

celestale commented 7 years ago

Tested with 19.33.0 but failed with the same error.

  electron-builder Async task error: Error: C:\Users\desk\AppData\Local\electron-builder\cache\nsis\nsis-3.0.1.13\Bin\makensis.exe exited with code 1
  electron-builder Error output:
  electron-builder Can't open output file
  electron-builder Error - aborting creation process

I believe this is a machine/local account problem. Repo is working fine in other machine. Thanks.