Jul 16, 2020
Windows: Error: listen EACCES: permission denied 0.0.0.0:{{PORT}}
I got an error listen EACCES: permission denied 0.0.0.0:4200 while starting Angular project by “npm start”.
Solution 1
Run:
net stop winnat
net start winnat
Solution 2
- I ran
netsh int ipv4 show dynamicport tcp
and verified that the range trampled commonly-used ports (postgresql's:5432
in my case) - Ran
netsh int ipv4 set dynamic tcp start=10000 num=20000
to reset it to something sane - Also ran
reg add HKLM\SYSTEM\CurrentControlSet\Services\hns\State /v EnableExcludedPortRange /d 0 /f
for good measure asnetsh int ipv4 show excludedportrange protocol=tcp
showed a lot of excluded ports - Reboot
In my case I changed “start” to “10000” and “num” to “20000”.