My app shows an error but it disappears when debugging

Hi forum!

I am struggling to find the reason for my app showing an error. The error is ‘RangeError: “port” argument must be >= 0 and < 65536’ but I cannot find anything wrong in my server.js file. Actually, I have this same server.js in another app and it works fine. Also, if I turn on the debugger, the app works.

I am new to glitch so probably I am missing something very simple. Any help would be appreciated. Thank you very much

Hi @dbarcosb, welcome to the forum!

It looks to me like you’re overriding PORT in your .env file, and it’s blank in there. Glitch manages that particular environment variable, so if you remove that from your .env file things should work better.


Thanks so much for the quick response. It worked! :slight_smile:

1 Like