Throw er; // Unhandled 'error' event

#1

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.

0 Likes

#2

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?

0 Likes

#3


Hi. That’s what I get.

0 Likes

#4

Are you still having this issue?

0 Likes

#5

Yes, I am.
sflkjsdflksqjflkqjflfsqjsqldfj (Just saying some text, because it has to be 20 chars long.)

0 Likes

#6


Oh, how can you guys look at my code? I mean, how do you do it? Is there a specific url for it?

0 Likes

#7

You mentioned the name of your project above. The URL for it is https://glitch.com/edit/#!/9106184

0 Likes

#8

Hello. Have you solved this problem? if yes please share, I am trying to solve this error for several month ))

0 Likes

#9

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.

0 Likes

#10

Solved. Sorry for replying late.

0 Likes

#11

Hello, how did you solve it?

0 Likes

#12

I don’t know. I logged in one day and it was solved. :wink:

1 Like

#13

Hello there, i have a similar issue, but i think its cause the debugger trying to work on port 3000 ?

I’m just trying to make debugger work on a node 8 app

0 Likes

#14

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.

1 Like

#15

working now :slight_smile:

0 Likes

#16

is there a way to make it work on firefox ? @cori

0 Likes

#17

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/

0 Likes