RangeError [ERR_SOCKET_BAD_PORT]: Port should be >= 0 and < 65536. Received

RangeError [ERR_SOCKET_BAD_PORT]: Port should be >= 0 and < 65536. Received .
12:07 AM
    at Server.listen (net.js:1396:13)
12:07 AM
    at Function.listen (/rbd/pnpm-volume/f44c3be7-89ee-4548-a1f9-4b5e24cf923a/node_modules/.registry.npmjs.org/express/4.16.3/node_modules/express/lib/application.js:618:24)
12:07 AM
Jump to 
at Object.<anonymous> (/app/bot.js:4:12)
12:07 AM
    at Module._compile (internal/modules/cjs/loader.js:701:30)
12:07 AM
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
12:07 AM
    at Module.load (internal/modules/cjs/loader.js:600:32)
12:07 AM
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
12:07 AM
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
12:07 AM
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
12:07 AM
    at startup (internal/bootstrap/node.js:283:19)
12:07 AM

https://gyazo.com/3fc6602d3672da8017ae15bc9f5e7f4d

I get this error, and idk what to do.
I am not good at programming and not sure what to do.

It says, that the PORT is out of range. Check your .env file, and (by default) your env.PORT value should be 3000. Write this line in your .env file:

PORT=3000

MOD EDIT: update incorrect PORT reference

1 Like

Thank you! <3
There wasn’t any number, but thank you for helping me.

1 Like

i am pretty sure the port is supposed to be default 3000

1 Like

There’s no need to overwrite PORT in the .env file. If the Glitch staff ever changes this (I doubt they would though), it could cause issues for a lot of problems.