Chapter 0. Node issue

Hi, I’m stocked in this part, I tried to follow other solutions with this same issue, but it seems now it’s not working that solution of delete node folder and package-lock.json . Seems is something with nodemon, but don’t know how to fix it.

❯ npm start

> server@1.0.0 start
> nodemon -L ./index.js

[nodemon] 2.0.20
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node ./index.js`
(node:7734) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
(Use `node --trace-warnings ...` to show where the warning was created)
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use :::5000
    at Server.setupListenHandle [as _listen2] (node:net:1432:16)
    at listenInCluster (node:net:1480:12)
    at Server.listen (node:net:1568:7)
    at Function.listen (/Users/sr.ji/Downloads/mflix-js/node_modules/express/lib/application.js:635:24)
    at _callee$ (/Users/sr.ji/Downloads/mflix-js/src/index.js:39:9)
    at tryCatch (/Users/sr.ji/Downloads/mflix-js/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:72:17)
    at Generator._invoke (/Users/sr.ji/Downloads/mflix-js/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:55:24)
    at Generator.next (/Users/sr.ji/Downloads/mflix-js/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:97:21)
    at asyncGeneratorStep (/Users/sr.ji/Downloads/mflix-js/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/Users/sr.ji/Downloads/mflix-js/node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Emitted 'error' event on Server instance at:
    at emitErrorNT (node:net:1459:8)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'EADDRINUSE',
  errno: -48,
  syscall: 'listen',
  address: '::',
  port: 5000
}
[nodemon] app crashed - waiting for file changes before starting...

Means you have another process listening on the same port:

3 Likes