我最近更新到最新的nodejs版本--6.8.1。当我尝试从项目根目录运行npm start时,它会发出此错误:
> v2@0.0.1 start /home/megamind/Swift
> node ./bin/www
npm ERR! Linux 4.2.0-42-generic
npm ERR! argv "/usr/local/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.8.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! v2@0.0.1 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v2@0.0.1 start script 'node ./bin/www'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the v2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs v2
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls v2
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/megamind/Swift/npm-debug.log
npm -v prints:3.10.8
node -v prints:v6.8.1
npm config获取注册表打印:https://registry.npmjs.org/
操作系统:linux
我也试过从我的项目root运行节点./bin/www,但它什么也没做。这是输出。
megamind:~/Swift$ node ./bin/www
megamind:~/Swift$
这是我的npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@3.10.8
3 info using node@v6.8.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle v2@0.0.1~prestart: v2@0.0.1
6 silly lifecycle v2@0.0.1~prestart: no script for prestart, continuing
7 info lifecycle v2@0.0.1~start: v2@0.0.1
8 verbose lifecycle v2@0.0.1~start: unsafe-perm in lifecycle true
9 verbose lifecycle v2@0.0.1~start: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/megamind/Swift/node_modules/.bin:/opt/apache-maven-3.3.9/bin:/opt/jdk1.8.0_102/bin:/opt/jdk1.7.0_45/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
10 verbose lifecycle v2@0.0.1~start: CWD: /home/megamind/Swift
11 silly lifecycle v2@0.0.1~start: Args: [ '-c', 'node ./bin/www' ]
12 silly lifecycle v2@0.0.1~start: Returned: code: 1 signal: null
13 info lifecycle v2@0.0.1~start: Failed to exec start script
14 verbose stack Error: v2@0.0.1 start: `node ./bin/www`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:255: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> (/usr/lib/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:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid v2@0.0.1
16 verbose cwd /home/megamind/Swift
17 error Linux 4.2.0-42-generic
18 error argv "/usr/local/bin/node" "/usr/bin/npm" "start"
19 error node v6.8.1
20 error npm v3.10.8
21 error code ELIFECYCLE
22 error v2@0.0.1 start: `node ./bin/www`
22 error Exit status 1
23 error Failed at the v2@0.0.1 start script 'node ./bin/www'.
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 v2 package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node ./bin/www
23 error You can get information on how to open an issue for this project with:
23 error npm bugs v2
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls v2
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
有人可以告诉我们如何解决这个问题吗?