npm run serve failed
Hi! I am getting this error when I run npm run serve... What I can do with that?
photoblog@ serve C:\Kasia\Angular2 first project\photo_blog webpack-dev-server --config config/develop.config.js --inline --progress --port 8080 70% 3/3 build modules events.js:160 throw er; // Unhandled 'error' event ^
Error: listen EADDRINUSE 127.0.0.1:8080 at Object.exports._errnoException (util.js:1018:11) at exports._exceptionWithHostPort (util.js:1041:20) at Server._listen2 (net.js:1258:14) at listen (net.js:1294:10) at net.js:1404:9 at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:81:10)
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "serv
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! photoblog@ serve:
webpack-dev-server --config config/develop.config.js --inline --progress --port 8080
npm ERR! Exit status 1
npm ERR! Failed at the photoblog@ serve script 'webpack-dev-server --config config/develop.config.js --inline --progress --port
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 photoblog package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --config config/develop.config.js --inline --progress --port 8080
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs photoblog
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls photoblog
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! C:\Kasia\Angular2 first project\photo_blog\npm-debug.log
Seth KrogerTreehouse Moderator 50,589 Points
You have another server running on the same port/address (The "EADDRINUSE 127.0.0.1:8080", is Error, Address In Use), and if you ran the same command before that server could very well still be running. If you go to localhost:8080 in your web browser does it show you that project you're working on or something else? Do you have other terminal windows/tabs open? (if you find something running use Ctrl+D to stop it) Try hunting down the process in Task Manager and end it. And, as a last resort, reboot.
I restarted my PC and it worked. I had open terminal in Visual Studio. I didn't have another terminal open.
Thanks for your answer :)