vite error when starting dev server

现象

执行 yarn start 终端报错

error when starting dev server:
Error: listen EACCES: permission denied 127.0.0.1:3210
    at Server.setupListenHandle [as _listen2] (node:net:1355:21)
    at listenInCluster (node:net:1420:12)
    at GetAddrInfoReqWrap.doListen [as callback] (node:net:1559:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8)
error Command failed with exit code 1.

解决方法

I have encountered the same problem and solved by the following methods.

  1. Open PowerShell as Admin.
  2. stop winnat with command: net stop winnat
  3. start winnat again with command: net start winnat

References: https://stackoverflow.com/questions/60485038/ng-server-listen-eacces-permission-denied-127-0-0-14200

发表评论

您的电子邮箱地址不会被公开。