Npm run electron failed to pack deskptop app with Anglular2 Cli


#1

Hi,
build creation failed in between, I am using Electron with Angular CLI
nodeJs - 7.4
npm – 4.2.0
electron – 1.6.2
I have created simple angular application read json object and construct html view base on json object.

Error :
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 ‘electron’ ]
2 info using npm@4.2.0
3 info using node@v7.9.0
4 verbose run-script [ ‘preelectron’, ‘electron’, ‘postelectron’ ]
5 info lifecycle angular@0.0.0~preelectron: angular@0.0.0
6 silly lifecycle angular@0.0.0~preelectron: no script for preelectron, continuing
7 info lifecycle angular@0.0.0~electron: angular@0.0.0
8 verbose lifecycle angular@0.0.0~electron: unsafe-perm in lifecycle true
9 verbose lifecycle angular@0.0.0~electron: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\electronDevelopment\angular\node_modules.bin;C:\ProgramData\Oracle\Java\javapath;C:\client1;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\Program Files\nodejs;C:\Program Files\Java\jdk1.8.0_101\bin;C:\Program Files (x86)\mingw-w64\i686-5.2.0-posix-dwarf-rt_v4-rev0\mingw32\bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\apparao.saripilli\AppData\Roaming\npm;C:\Users\apparao.saripilli\AppData\Local\Android\sdk\tools;C:\Users\apparao.saripilli\AppData\Local\Android\sdk\platform-tools
10 verbose lifecycle angular@0.0.0~electron: CWD: C:\electronDevelopment\angular
11 silly lifecycle angular@0.0.0~electron: Args: [ ‘/d /s /c’, ‘npm run build-electron && electron dist/’ ]
12 silly lifecycle angular@0.0.0~electron: Returned: code: 1 signal: null
13 info lifecycle angular@0.0.0~electron: Failed to exec electron script
14 verbose stack Error: angular@0.0.0 electron: npm run build-electron && electron dist/
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:194:7)
14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:194:7)
14 verbose stack at maybeClose (internal/child_process.js:899:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid angular@0.0.0
16 verbose cwd C:\electronDevelopment\angular
17 error Windows_NT 6.1.7601
18 error argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “run” "electron"
19 error node v7.9.0
20 error npm v4.2.0
21 error code ELIFECYCLE
22 error errno 1
23 error angular@0.0.0 electron: npm run build-electron && electron dist/
23 error Exit status 1
24 error Failed at the angular@0.0.0 electron script ‘npm run build-electron && electron dist/’.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the angular package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error npm run build-electron && electron dist/
24 error You can get information on how to open an issue for this project with:
24 error npm bugs angular
24 error Or if that isn’t available, you can get their info via:
24 error npm owner ls angular
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]

Please advise me is there any version conflict or packging issue ?

src/package.json

{
“name”: “angular”,
“version”: “1.0.0”,
“description”: “”,
“main”: “electron.js”
}