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 trialCharlie Roberts
12,014 PointsNode.js v21.1.0 [nodemon] app crashed - waiting for file changes before starting...
I ran npm install and then got an error when I run npm start:
Node.js v21.1.0 [nodemon] app crashed - waiting for file changes before starting...
I tried restarting the nodemon server and killing all node processes but I still get the error. I'm a beginner here and I don't know how to continue?
Error: listen EADDRINUSE: address already in use :::5000 at Server.setupListenHandle [as _listen2] (node:net:1872:16) at listenInCluster (node:net:1920:12) at Server.listen (node:net:2008:7) at Function.listen (/Users/charlie/Documents/Web Dev/Team Treehouse/Sequelize Model Validation/sequelize-model-validation/6 - Password Confirmation and Hashing/rest-api/node_modules/express/lib/application.js:635:24) at /Users/charlie/Documents/Web Dev/Team Treehouse/Sequelize Model Validation/sequelize-model-validation/6 - Password Confirmation and Hashing/rest-api/app.js:60:24 Emitted 'error' event on Server instance at: at emitErrorNT (node:net:1899:8) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { code: 'EADDRINUSE', errno: -48, syscall: 'listen', address: '::', port: 5000 }
Node.js v21.1.0 [nodemon] app crashed - waiting for file changes before starting...
1 Answer
Simon Coates
8,481 PointsIf you google that error, that message ("Error: listen EADDRINUSE: address already in use") seems to typically be when you already have something listening on that port. If you have a terminal already running, control-c might kill the process. Otherwise you might need to manually kill the process (which might vary depending on OS), use a different port (if that's something you have control over) or reset your local machine.