“npm run dev”启动项目突然报以下错误:
error when starting dev server:
Error: listen EACCES: permission denied 0.0.0.0:80
at listenInCluster (node:net:1945:12)
at Server.listen (node:net:2037:7)
at httpServer.listen (file:///D:/Vue3/node_modules/vite/dist/node/chunks/dep-4RECYSE1.js:59833:20)
原因:端口号被占用了。
解决:
npm run dev -- --port 端口号