Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

APIs

Desmond Dallas
Desmond Dallas
6,985 Points

Express - flashcard app

Hi, Im doing the express course. Somehow I cannot connect to the local host anymore. Im getting the following error. Can anyone help with this.

events.js:183 throw er; // Unhandled 'error' event ^

Error: listen EADDRINUSE :::3000 at Object._errnoException (util.js:992:11) at _exceptionWithHostPort (util.js:1014:20) at Server.setupListenHandle [as _listen2] (net.js:1355:14) at listenInCluster (net.js:1396:12) at Server.listen (net.js:1480:7) at Function.listen (/Users/desmonddallas/flashcards/node_modules/express/lib/application.js:618:24) at Object.<anonymous> (/Users/desmonddallas/flashcards/app.js:23:5) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32)

Desmond Dallas
Desmond Dallas
6,985 Points

Thanks but Ive tried and unsure how to set it to the correct port, or how do I know Im setting it to a correct port to work. Ive noticed in the app.js file all the (req) are greyed out. Completely lost on this one :(

1 Answer

Hi,

You were likely still listening on port 3000 with a different application. The error indicates that port 3000 is in use. Try listening on a different port