2

Here is the code that have the issue with: link. Anyway I don't think the problem is in the code itself. There are a lot of articles on the internet about this issue but none of them helped so far. And I spent like 2 full days digging into this issue.

  1. The port that I'm trying with is high like above 8000.
  2. When I check the availability of that port its available.
  3. I also tried running my server on two separate machines and the same error pops.
  4. Tried by running 'npm start' in cmd with admin permissions - same error.
  5. Restarted the machines several times - waste of time.
  6. As you can see I'm not making that mistake of swapping the port with the host.
  7. There were people saying that the user that executes the command usually dont have permissions and that's why the problem appears.Here you can see that I have full permissions.

I'm really desperate at this point. I was even thinking about buy a new laptop but when I checked on the second machine I realized that this will not fix the issue.

2
  • Your first link is dead, so people can't see the context of your question. Without that, your answer is kind of a non sequitur. Your second link is still there, but at a third-party site and may not continue to be available. Please make the question self-contained by including the essential information within the question. – fixer1234 Jun 1 '19 at 22:52
  • If you've installed docker using windows containers, this might help: superuser.com/a/1288756/769411 This solved it for me (disabling hyper-v, reboot). – Guus Baggen Mar 1 '20 at 13:21
1

It turns out that my .env file is incorrect. You should not put ',' separator between the variables.

3
  • 1
    Not sure why this has been downvoted, it is the correct answer. I had the same problem but I was using a semicolon after each value, So instead of the value being read as "3000" it was read as "3000;" which errors. – Antfish Feb 27 '20 at 11:23
  • worked! maybe the downvotes were because you did't give a detailed explanation – Dheeraj Nov 30 '20 at 16:22
  • This problem occurs on Windows regardless of .env settings. For many, it is caused by a Windows WSL2 Hyper-V bug that locks port access. – robross0606 Feb 11 at 19:15
0

If its a react app be sure you're in the client directory and that you're not trying to run you react app in server directory...as it won't give you error but address issues

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.