error when starting dev server: Error: listen EACCES: permission denied 0.0.0.0:80
(base) h@h-virtual-machine:~/work/RuoYi-Vue3$ yarn devyarn run v1.22.22$ viteerror when starting dev server:Error: listen EACCES: permission denied 0.0.0.0:80at Server.setupListenHandle [as _listen2]
·
报错:
(base) h@h-virtual-machine:~/work/RuoYi-Vue3$ yarn dev
yarn run v1.22.22
$ vite
error when starting dev server:
Error: listen EACCES: permission denied 0.0.0.0:80
at Server.setupListenHandle [as _listen2] (node:net:1880:21)
at listenInCluster (node:net:1945:12)
at Server.listen (node:net:2037:7)
at httpServer.listen (file:///home/h/work/RuoYi-Vue3/node_modules/vite/dist/node/chunks/dep-4RECYSE1.js:59833:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
这个错误通常是由于尝试在非特权端口(如80)上启动服务器而导致的权限被拒绝。这可能是因为你没有足够的权限来监听该端口。
解决方法1:使用 sudo 命令来以管理员权限运行该命令
sudo yarn dev
解决方法2:使用其他端口
yarn dev --port 3000
更多推荐
已为社区贡献2条内容
所有评论(0)