[Solved] Error reporting of NPM packaged electron app

During desktop packaging, the following errors are encountered:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;E:\CodeSpace\SCM_TEST\desktop\node_modules\.bin;C:\Program Files\nodejs;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program\JAVA\jdk1.8.0_91\bin;C:\Program\ANT\apache-ant-1.9.7\bin;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program\DicomViewer\WanLiYunDiagonse\Bin;C:\Users\Administrator\AppData\Roaming\npm;C:\Python27;C:\Program\DicomViewer\WanLiYunDiagonse\Bin
10 verbose lifecycle [email protected]~start: CWD: E:\CodeSpace\SCM_TEST\desktop
11 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'electron app' ]
12 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `electron app`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:242:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\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:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:852:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid [email protected]
16 verbose cwd E:\CodeSpace\SCM_TEST\desktop
17 error Windows_NT 10.0.10586
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 error node v6.3.0
20 error npm  v3.10.5
21 error code ELIFECYCLE
22 error [email protected] start: `electron app`
22 error Exit status 1
23 error Failed at the [email protected] start script 'electron app'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the lifeccp-desktop package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     electron app
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs lifeccp-desktop
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls lifeccp-desktop
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

 

Solution:

This is how I solved the issue on Windows 8.1

Go to your nodejs install (usually C:\Program Files\nodejs)

Right click node_modules folder and go to properties

Click the Security tab and advanced

At the top you will see “Owner: SYSTEM”. Click change.

Enter the user you want permissions for and click ok

Check the box at the bottom of the advanced settings “Replace all child object permission entries with inheritable permission entries from this object” and click ok

Do whatever npm install/update you need.

Similar Posts: