端口异常
错误消息:
error when starting dev server: Error: listen EACCES: permission denied 127.0.0.1:3000 at Server.setupListenHandle [as _listen2] (node:net:1355:21) at listenInCluster (node:net:1420:12) at doListen (node:net:1559:7) at processTicksAndRejections (node:internal/process/task_queues:84:21)ELIFECYCLE Command failed with exit code 1.
解决方案:
- https://github.com/vitejs/vite/issues/5801
- https://superuser.com/questions/1437780/how-to-fix-listen-eacces-permission-denied-on-any-port/1568476#1568476
- https://github.com/docker/for-win/issues/3171
解决:
shell管理员
net stop winnat
netsh int ipv4 set dynamic tcp start=49152 num=16384
netsh int ipv6 set dynamic tcp start=49152 num=16384
net start winnat