node:events:505 throw er; // Unhandled 'error' event Error: listen EACCES: permission denied 4000;

Viewed 2594

node:events:505 throw er; // Unhandled 'error' event ^

Error: listen EACCES: permission denied 4000; at Server.setupListenHandle [as _listen2] (node:net:1363:21) at listenInCluster (node:net:1428:12) at Server.listen (node:net:1527:5) at Function.listen (D:\REACT JS\E-COMMERCE\node_modules\express\lib\application.js:635:24) at Object. (D:\REACT JS\E-COMMERCE\backend\server.js:10:5) at Module._compile (node:internal/modules/cjs/loader:1099:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) Emitted 'error' event on Server instance at: at emitErrorNT (node:net:1407:8) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -4092, syscall: 'listen', address: '4000;', port: -1 }

1 Answers

It's a permission issue, you can just write sudo as a prefix before your command if you are using linux/Mac

Related