Пытаюсь установить и запустить сервер, но Nodemon выдает ошибку
node:events:504
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE: address already in use :::5000
at Server.setupListenHandle [as _listen2] (node:net:1330:16)
at listenInCluster (node:net:1378:12)
at Server.listen (node:net:1465:7)
at Function.listen (/Users/blvckonej/Desktop/web/maximaPractise2/practice-2-maxima-store-group-1/server/node_modules/express/lib/application.js:635:24)
at start (/Users/blvckonej/Desktop/web/maximaPractise2/practice-2-maxima-store-group-1/server/index.js:10:13)
at Object.<anonymous> (/Users/blvckonej/Desktop/web/maximaPractise2/practice-2-maxima-store-group-1/server/index.js:16:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net:1357: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...
Код JS
const express = require('express');
const cors = require('cors');
const cookieParser = require('cookie-parser');
const PORT = 5000;
const app = express();
const start = async () => {
try {
app.listen(PORT, () => console.log(`Server started on PORT = ${PORT}`))
} catch (e) {
console.log(e);
}
}
start();