2017-11-11 69 views
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 ] 
+0

我正在考虑两种可能性。 1)构建文件中的代码存在问题。 2)某些模块不支持新节点版本,无法启动。 Vue Js书是在节点9.1出现之前编写的。我不知道哪个模块。 –

+0

感谢您的反馈,日志文件不能提供任何线索,这不是很有趣吗?.... – erwin

+0

它给你一个线索。错误代码ELIFECYCLE意味着代码意外停止。或换句话说坠毁。为什么?好问题。但为了回答这个问题,我们需要调试构建脚本中包含的所有模块和代码。从我看到的我会检查shelljs,webpack,ora。检查包json中的版本,并确保它们支持节点版本9 ...或者只是将它们更新到最新版本。 –

回答

0

我回到节点8.9.1/5.5.1 NVM(捆绑)...解决 也许过早升级到节点9 ....