I never get problem with the MERN stack, but it's the first time than i use typeScript.
I encountered an issue when starting my server.
when I run npm run dev, a new error occurs: Error: listen EACCES: permission denied 5000. I've tried different ports, but the error persists...
What could be causing this permission issue, and how can I resolve it?
It's worth noting that I tried opening Express with older projects, and it works fine. So, the issue doesn't seem to be related to my firewall.
What could be causing this permission issue, and how can I resolve it?
You can check my code on GitHub
-
Did you try port 8050? Btw, put .env on your .gitignore.pzaenger– pzaenger2023年09月18日 16:43:20 +00:00Commented Sep 18, 2023 at 16:43
-
Yes i tried port 8050, 8080, 3000, 5000 ... Thanks for the .env in the .gitignoreWilOnWeb– WilOnWeb2023年09月19日 12:55:25 +00:00Commented Sep 19, 2023 at 12:55
1 Answer 1
Your .env file must use this format:
Correct:
PORT=8050
Incorrect:
PORT = 8050;
Do not include semicolons or spaces in your .env file.