报错情况
error when starting dev server:Error: listen EACCES: permission denied 127.0.0.1:80 at Server.setupListenHandle [as _listen2] (node:net:1415:21) at listenInCluster (node:net:1480:12) at GetAddrInfoReqWrap.doListen [as callback] (node:net:1629:7) at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:111:8)
启动项目加个端口(任意)
npm run dev -- --port 81
报错原因
文件package.json 端口80冲突
"scripts": { "dev": "vite --port 80--open", //端口80冲突 "build": "vue-tsc && vite build", "preview": "vite preview" },
来源地址:https://blog.csdn.net/beiback/article/details/129489305