1
resposta

Erro com o nodemon

Ao alterar o rotas.js, estando o nodemon server.js rodando, tomo o erro:

events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use :::3000
    at Server.setupListenHandle [as _listen2] (net.js:1280:14)
    at listenInCluster (net.js:1328:12)
    at Server.listen (net.js:1415:7)
    at Function.listen (/home/bruna.costa/Dev/casaDoCódigo/node_modules/express/lib/application.js:618:24)
    at Object.<anonymous> (/home/bruna.costa/Dev/casaDoCódigo/server.js:3:5)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Emitted 'error' event at:
    at emitErrorNT (net.js:1307:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
[nodemon] app crashed - waiting for file changes before starting...
1 resposta

Oi, Bruna, tudo bem?

Tem algum outro processo rodando na porta 3000? O erro no terminal nos diz que a porta 3000 está em uso.

Derruba o terminal utilizando o ctrl + c, fecha o VSCode e sobe novamente. Veja se corrigi esse problema :}