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

JavaScript User Authentication With Express and Mongo What is Authentication? Setting Up the Project

Tom Nunn
Tom Nunn
16,333 Points

Project Downloads - Showing Error

Has anyone had any issues when downloading the Project files? I've run npm install in S1V4 and S2V2 directories to install the dependencies, when I try to run the app node app all I get is the error stack pasted below. Any ideas?

āžœ  S2V2 node app.js
      throw er; // Unhandled 'error' event

Error: listen EADDRINUSE :::3000
    at Object.exports._errnoException (util.js:1028:11)
    at exports._exceptionWithHostPort (util.js:1051:20)
    at Server._listen2 (net.js:1261:14)
    at listen (net.js:1297:10)
    at Server.listen (net.js:1375:9)
    at Function.listen (/Users/Tom/Google Drive/Projects/JavaScript-user-auth-express/S2V2/node_modules/express/lib/application.js:618:24)
    at Object.<anonymous> (/Users/Tom/Google Drive/Projects/JavaScript-user-auth-express/S2V2/app.js:38:5)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)

1 Answer

Tom Nunn
Tom Nunn
16,333 Points

This was a mistake by me, although after a bit of Googling and looking through Stack Overflow it seems to be quite common and easily done.

I had another Node server running which had not been terminated correctly. There is a nice explanation here (http://stackoverflow.com/questions/10522532/stop-node-js-program-from-command-line):

See Node Processes

ps aux | grep node

Find the Process ID (Second Value from the Left) Replace 'PROCESS_ID' with the ID of the Node Process

kill -9 PROCESS_ID

You can also simply try closing your Terminal and Starting it back up again.