1
將項目升級到node.js 9.1.0(和bundle nom 5.5.1)後,我運行install wo錯誤。即使日誌輸出「詳細」,我不明白的地方是問題...幫助歡迎node.js 9和npm 5.5.1:無法正確運行
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Volumes/aragorn/Users/yves/Developments/WIP/VUE.JS/LearningVuejs2_Code/chapter7/ShoppingList/node_modules/.bin:/usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Volumes/aragorn/Users/yves/Developments/WIP/VUE.JS/LearningVuejs2_Code/chapter7/ShoppingList/node_modules/.bin:/usr/texbin:/opt/Ghostscript/bin:/opt/ImageMagick/bin:/usr/local/opt/mysql/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/Users/yves/bin:/usr/local/git/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/yves/.rvm/bin:/Users/yves/go/bin
9 verbose lifecycle [email protected]~build: CWD: /Volumes/aragorn/Users/yves/Developments/WIP/VUE.JS/LearningVuejs2_Code/chapter7/ShoppingList
10 silly lifecycle [email protected]~build: Args: [ '-c', 'node build/build.js' ]
11 silly lifecycle [email protected]~build: Returned: code: 1 signal: null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] build: `node build/build.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack at emitTwo (events.js:135:13)
13 verbose stack at EventEmitter.emit (events.js:224:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:135:13)
13 verbose stack at ChildProcess.emit (events.js:224:7)
13 verbose stack at maybeClose (internal/child_process.js:943:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid [email protected]
15 verbose cwd /Volumes/aragorn/Users/yves/Developments/WIP/VUE.JS/LearningVuejs2_Code/chapter7/ShoppingList
16 verbose Darwin 17.2.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v9.1.0
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: `node build/build.js`
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
我正在考慮兩種可能性。 1)構建文件中的代碼存在問題。 2)某些模塊不支持新節點版本,無法啓動。 Vue Js書是在節點9.1出現之前編寫的。我不知道哪個模塊。 –
感謝您的反饋,日誌文件不能提供任何線索,這不是很有趣嗎?.... – erwin
它給你一個線索。錯誤代碼ELIFECYCLE意味着代碼意外停止。或換句話說墜毀。爲什麼?好問題。但爲了回答這個問題,我們需要調試構建腳本中包含的所有模塊和代碼。從我看到的我會檢查shelljs,webpack,ora。檢查包json中的版本,並確保它們支持節點版本9 ...或者只是將它們更新到最新版本。 –