標籤:
在進行desktop打包過程中,遇到如下報錯:
0 info it worked if it ends with ok1 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, continuing7 info lifecycle [email protected]~start: [email protected]8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true9 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\Bin10 verbose lifecycle [email protected]~start: CWD: E:\CodeSpace\SCM_TEST\desktop11 silly lifecycle [email protected]~start: Args: [ ‘/d /s /c‘, ‘electron app‘ ]12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null13 info lifecycle [email protected]~start: Failed to exec start script14 verbose stack Error: [email protected] start: `electron app`14 verbose stack Exit status 114 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\desktop17 error Windows_NT 10.0.1058618 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.020 error npm v3.10.521 error code ELIFECYCLE22 error [email protected] start: `electron app`22 error Exit status 123 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 app23 error You can get information on how to open an issue for this project with:23 error npm bugs lifeccp-desktop23 error Or if that isn‘t available, you can get their info via:23 error npm owner ls lifeccp-desktop23 error There is likely additional logging output above.24 verbose exit [ 1, true ]
看到 stackoverflow 上面 http://stackoverflow.com/questions/35040729/running-npm-install-g-yo-command-gives-npm-err-windows-nt-6-1-7601/35043377#35043377 有這個解決辦法:
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
用該辦法嘗試,但未解決,再次嘗試其他辦法;
npm 打包 electron app 報錯問題