Reputation: 128
As a primer, I'm new to node and I have tried npm install [email protected] --save-dev --save-exact
from https://github.com/ionic-team/ionic-cli/issues/2922 for resolving the below issue.
node server.js
Creating new shopping list item
Creating new shopping list item
Creating new shopping list item
events.js:183
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::8080
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at Server.listen (net.js:1476:7)
at Function.listen (C:\Users\Rob\WebProjects\npm-script-example\node-shoppin g-list-v1\node_modules\express\lib\application.js:618:24)
at Object.<anonymous> (C:\Users\Rob\WebProjects\npm-script-example\node-shop ping-list-v1\server.js:34:5)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Rob\AppData\Roaming\npm-cache\_logs\2018-01-25T05_03_00_40 4Z-debug.log
My repo is here...for what it's worth I'm on Windows. How should I resolve the js.183 error?
Upvotes: 1
Views: 1566
Reputation: 286
I replaced IP address with localhost
and it worked for me:
server.listen(3000, '**old ip address**');
server.listen(3000, '**localhost**');
I tried many solutions but none of them worked. Try this I hope it will help.
Upvotes: 1
Reputation: 2411
Your error is, Error: listen EADDRINUSE :::8080
so something else is already running on port 8080. You will need to find out what is using it, you can run the following in an elevated command prompt on Windows:
netstat -a -b
Once you have identified what is running on that port, you will need to kill it, or if it is something you need to keep running, you will need to choose a different port for your app to run on.
Upvotes: 1