2016-04-11 7 views
1

私は 'npm start'でこのアプリを実行しようとすると、このエラーがスローされます。私はノードとNPMを更新しましたが、このエラーはまだスローされています。彼らがKrakenJSに問題があるのだろうか?それはあなたがポート8000​​でサーバーを実行しようと何かがすでにそれを使用しているかのように見え、事前にノード 'npm start'を実行するとJSエラーが発生する、おそらくKrakenJSですか?

おかげ

> node server.js 
 

 
Mon, 11 Apr 2016 13:41:08 GMT uncaughtException listen EADDRINUSE :::8000 
 
Error: listen EADDRINUSE :::8000 
 
    at Object.exports._errnoException (util.js:890:11) 
 
    at exports._exceptionWithHostPort (util.js:913:20) 
 
    at Server.__dirname.Server.Server._listen2 (net.js:1230:14) 
 
    at listen (net.js:1266:10) 
 
    at Server.__dirname.Server.Server.listen (net.js:1362:5) 
 
    at Object.<anonymous> (/Users/.../server.js:14:8) 
 
    at Module._compile (module.js:413:34) 
 
    at Object.Module._extensions..js (module.js:422:10) 
 
    at Module.load (module.js:357:32) 
 
    at Function.Module._load (module.js:314:12) 
 

 
npm ERR! Darwin 14.5.0 
 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 
 
npm ERR! node v5.10.1 
 
npm ERR! npm v3.8.3 
 
npm ERR! code ELIFECYCLE 
 
npm ERR! [email protected] start: `node server.js` 
 
npm ERR! Exit status 1 
 
npm ERR! 
 
npm ERR! Failed at the [email protected] start script 'node server.js'. 
 
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 testapp package, 
 
npm ERR! not with npm itself. 
 
npm ERR! Tell the author that this fails on your system: 
 
npm ERR!  node server.js 
 
npm ERR! You can get information on how to open an issue for this project with: 
 
npm ERR!  npm bugs testapp 
 
npm ERR! Or if that isn't available, you can get their info via: 
 
npm ERR!  npm owner ls testapp 
 
npm ERR! There is likely additional logging output above.

+0

'http:// localhost:8000'に移動するとどうなるでしょうか? – RhysO

答えて

1

にバインド何かを持っている場合、何かがすでにポート8000​​のTryランニングをリスニングしているように見えます見るためにいくつかの診断を実行してみましょう:

lsof -i:8000 

と表示されているかどうかを確認してください。また、あなたが確認することができますhttp://localhost:8000

2

Mon, 11 Apr 2016 13:41:08 GMT uncaughtException listen EADDRINUSE :::8000 
Error: listen EADDRINUSE :::8000 

あなたのサーバーの別のポートを選択するか、あなたは8000

+0

ああ、どのように恥ずかしい!別の端末ウィンドウを開いて隠していました。ありがとう! – lucasjohnson

1

EADDRINUSEエラーは、使用されたポートが別のプログラムによってすべて使用されており、アプリケーションで使用できないことを示しています。 そのポートでアプリケーションを確認するか、ポート自体を変更してみてください。

関連する問題