【发布时间】:2017-01-10 19:04:37
【问题描述】:
我知道这是一种很糟糕的提问方式,但我已经为此工作了几个小时,但没有取得任何进展。昨晚一切正常,今天早上我从 App Store 获得了更新,让我重新启动,现在我的 npm 服务器(我正在尝试学习 React.js)无法正常工作。这是我的错误日志:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@4.0.5
3 info using node@v4.6.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle react-essential@1.0.0~prestart: react-essential@1.0.0
6 silly lifecycle react-essential@1.0.0~prestart: no script for prestart, continuing
7 info lifecycle react-essential@1.0.0~start: react-essential@1.0.0
8 verbose lifecycle react-essential@1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle react-essential@1.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/FrankHarvey/Dropbox/react-practice/node_modules/.bin:/Users/FrankHarvey/anaconda2/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
10 verbose lifecycle react-essential@1.0.0~start: CWD: /Users/FrankHarvey/Dropbox/react-practice
11 silly lifecycle react-essential@1.0.0~start: Args: [ '-c', 'webpack-dev-server' ]
12 silly lifecycle react-essential@1.0.0~start: Returned: code: 1 signal: null
13 info lifecycle react-essential@1.0.0~start: Failed to exec start script
14 verbose stack Error: react-essential@1.0.0 start: `webpack-dev-server`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:829:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid react-essential@1.0.0
16 verbose cwd /Users/FrankHarvey/Dropbox/react-practice
17 error Darwin 16.3.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 error node v4.6.1
20 error npm v4.0.5
21 error code ELIFECYCLE
22 error react-essential@1.0.0 start: `webpack-dev-server`
22 error Exit status 1
23 error Failed at the react-essential@1.0.0 start script 'webpack-dev-server'.
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 react-essential package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error webpack-dev-server
23 error You can get information on how to open an issue for this project with:
23 error npm bugs react-essential
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls react-essential
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
我试过了:
- 交换端口
- 恢复 git 提交
- 重新安装使用
sudo运行的节点
没有一个有效。
【问题讨论】:
-
尝试运行
npm install。看起来模块没有安装。
标签: node.js reactjs npm webpack-dev-server