2017-01-10 20 views
3

これは疑問を形作るひどい方法ですが、私は数時間この作業を進めており、何も進展しませんでした。すべてが完璧に昨夜働いていましたが、今朝私はApp Storeからアップデートを受けて再起動しました。今は自分のnpmサーバー(私はReact.jsを覚えようとしています)が動作していません。ここに私のエラーログは次のとおりです。webpack-dev-serverで "npm start"エラーが発生しました

0 info it worked if it ends with ok 
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', '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, continuing 
7 info lifecycle [email protected]~start: [email protected] 
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 
9 verbose lifecycle [email protected]~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 [email protected]~start: CWD: /Users/FrankHarvey/Dropbox/react-practice 
11 silly lifecycle [email protected]~start: Args: [ '-c', 'webpack-dev-server' ] 
12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null 
13 info lifecycle [email protected]~start: Failed to exec start script 
14 verbose stack Error: [email protected] 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 [email protected] 
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 [email protected] start: `webpack-dev-server` 
22 error Exit status 1 
23 error Failed at the [email protected] 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

    で実行しているノードを再インストール

  • をコミットします。

  • +0

    'npm install'を実行してみてください。モジュールがインストールされていないように見えます。 – lux

    答えて

    2

    node_modulesディレクトリからwebpack-dev-serverを削除し、コメントへnpm install webpack-dev-server

    おかげを実行し、私は解決することができました。私はnpm installを使って再インストールしようとしました。これはうまくいかなかった。私はnpm install webpack-dev-serverを使ってみると、エラーが発生しました。それはxyz/abc/node_modules/xyz/node_modules/abc/.bin/fileのようなものが存在し続けていた。移動してもう一度お試しください。私は数回試して、最終的にディレクトリからwebpack-dev-serverディレクトリ全体を削除して再インストールしました。それはすべて今働く。

    ところで、私はLynda.comの「React.js Essential Training」を使用していたので、これを使用しました。この問題が発生している可能性のある他のユーザーにのみ、この情報を含めてください。

    +0

    それは私のために働かなかった。この問題を解決する他の方法?私はWindows 7 x64を使用しています。 –

    +0

    npm installを実行するよりも、node_modulesフォルダとpackage-lock.jsonフォルダ全体を削除しました。このサーバーが正常に起動した後 – Nikita

    関連する問題