bradtraversy / proshop_mern

Shopping cart built with MERN & Redux
1.99k stars 1.18k forks source link

Deprecation & Runtime Issue #181

Closed talmax1124 closed 2 years ago

talmax1124 commented 2 years ago

Hello, I am encountering this error when running npm run dev

node:events:368

[0] throw er; // Unhandled 'error' event

[0] ^

[0]

[0] Error: listen EADDRINUSE: address already in use :::5000

[0] at Server.setupListenHandle [as _listen2] (node:net:1334:16)

[0] at listenInCluster (node:net:1382:12)

[0] at Server.listen (node:net:1469:7)

[0] at Function.listen (/Users/carlosdiazplaza/creativeduoshopping-master/node_modules/express/lib/application.js:618:24)

[0] at file:///Users/carlosdiazplaza/creativeduoshopping-master/backend/server.js:104:5

[0] at ModuleJob.run (node:internal/modules/esm/module_job:185:25)

[0] at async Promise.all (index 0)

[0] at async ESMLoader.import (node:internal/modules/esm/loader:281:24)

[0] at async loadESM (node:internal/process/esm_loader:88:5)

[0] at async handleMainPromise (node:internal/modules/run_main:65:12)

[0] Emitted 'error' event on Server instance at:

[0] at emitErrorNT (node:net:1361:8)

[0] at processTicksAndRejections (node:internal/process/task_queues:83:21) {

[0] code: 'EADDRINUSE',

[0] errno: -48,

[0] syscall: 'listen',

[0] address: '::',

[0] port: 5000

[0] }

[0]

[0] Node.js v17.0.1

[0] [nodemon] app crashed - waiting for file changes before starting...

[1] (node:37804) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.

[1] (Use node --trace-deprecation ... to show where the warning was created)

[1] Starting the development server...

[1]

I have already tried killall node and still does the same thing. & When it runs, backend is not responding. If anyone has any solutions, I will appreciate it, thanks! @basir @bradtraversy

talmax1124 commented 2 years ago

UDEMY URL https://www.udemy.com/course/mern-ecommerce/learn/lecture/22494990#questions/16243426

talmax1124 commented 2 years ago

Update, I tried to replicate it with multiple devices, and all have the same result. I also tried multiple repos as well as this one. Is there an update needed? @basir @bradtraversy

NickyGuants commented 2 years ago

Try using a different port in the backend.

talmax1124 commented 2 years ago

Issue fixed with this. Any reason why it is occuring? @NickyGuants