Olá! Estou com o seguinte problema com o nodemon e já tentei instalá-lo globalmente, adicionar uma nova função ao package.json, usar o comando echo $PATH(que não me retornou nada), mas nada funcionou. O código de erro que aparece quando tento mudar algum elemento do meu app é o seguinte:
[nodemon] starting `node app.js`
node:events:496
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE: address already in use :::8000
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 (C:\Users\lucky\Desktop\TONI DEV\JavaScript\formação full stack\alura-books-server\node_modules\express\lib\application.js:635:24)
at Object.<anonymous> (C:\Users\lucky\Desktop\TONI DEV\JavaScript\formação full stack\alura-books-server\app.js:11:5)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
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: -4091,
syscall: 'listen',
address: '::',
port: 8000
}
Node.js v20.11.0
[nodemon] app crashed - waiting for file changes before starting...