Hi there!
I’d like to know how I can fix that error on my project called “9106184”.
Here is the full error:
$ node index.js
events.js:165
throw er; // Unhandled ‘error’ event
^
Error: listen EADDRINUSE :::3000
at Server.setupListenHandle [as _listen2] (net.js:1346:14)
at listenInCluster (net.js:1387:12)
at Server.listen (net.js:1475:7)
at Function.listen (/rbd/pnpm-volume/7cf72968-cafa-4016-bcfb-73ecc5a2a533/node_modules/.registry.npmjs.org/express/4.16.3/node_modules/express/lib/application.js:618:24)
at Object. (/app/index.js:8:5)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
Emitted ‘error’ event at:
at emitErrorNT (net.js:1366:8)
at process._tickCallback (internal/process/next_tick.js:178:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:697:11)
at startup (internal/bootstrap/node.js:201:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
Thank you to whoever can fix this error. It may be a n00b question.
You get the error ‘Error: listen EADDRINUSE’ when multiple things are trying to use the same port, but looking at the code I couldn’t see anything obvious doing that. However, this error can also appear if your app is full. If you run df from the console how much space is being used for /app?
Let us know the project name and we’ll take a look. If your project is private, either make it public temporarily or DM me a join link so we can view the code. Thanks.
Hey @lucasverra in general it’s better to let Glitch handle the port your project uses, since we only open specific ports to the outside. This is particularly important when using the debugger, which doesn’t use port 3000. I’d suggest using process.env.PORT instead of 3000 when you set up your listener here.
I’d be interested to know if that resolves this issue, because just based on what I see here I wouldn’t have expected that specific error.
Hey @lucasverra I’m afraid for the moment the debugger only works in Chrome. Sorry for the bother! You can read a little more about the debugger requirements at https://glitch.com/help/debugreq/
olá, cori, estou com erro semelhante! no meu caso tudo parece que o Banco de Dados está caindo… Poderia me ajuda, sou novo por aqui, e novo no fórum também !
Error: Cannot enqueue Query after invoking quit.
[0] at Protocol._validateEnqueue (/home/cabral/Documentos/projetos/ree/node_modules/mysql/lib/protocol/Protocol.js:215:16)
[0] at Protocol._enqueue (/home/cabral/Documentos/projetos/ree/node_modules/mysql/lib/protocol/Protocol.js:138:13)