When I try to start the next js server with yarn dev
it will throw me up with this error. I need to restart the entire system in order for it to work.
And I'm running it on windows. It takes forever.
Error: listen EACCES: permission denied 0.0.0.0:3000
at Server.setupListenHandle [as _listen2] (net.js:1301:21)
at listenInCluster (net.js:1366:12)
at doListen (net.js:1503:7)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
code: 'EACCES',
errno: -4092,
syscall: 'listen',
address: '0.0.0.0',
port: 3000
}
The "solution" on windows for many people seems to disable virtual ethernet adapters (especially when you use docker). It could also be that another program is using the same port, which you can find out by using netstat -a
.
I disable all vEthernet adapters that were not in use and restarted. At some point it magically worked again. The setting can be found here: Control Panel > Network and Internet > Network Connections
source: https://github.com/BrowserSync/browser-sync/issues/1705#issuecomment-508846475
(Honestly the most annoying bug I had in a long time and a reason to switch to linux)