Windows – node Error: listen EACCES: permission denied ON ANY PORT [Windows]

networkingnode.jsnpmpermissionswindows

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.

Best Answer

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

Related Question