Running `bun run dev` on a newly created Cloudflare Pages example spits an error

bun run dev
$ vite
(!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling.
error when starting dev server:
Error: listen EACCES: permission denied ::1:5173
at Server.setupListenHandle [as _listen2] (node:net:1723:21)
at listenInCluster (node:net:1788:12)
at GetAddrInfoReqWrap.doListen [as callback] (node:net:1937:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:8)
error: script "dev" exited with code 1
bun run dev
$ vite
(!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling.
error when starting dev server:
Error: listen EACCES: permission denied ::1:5173
at Server.setupListenHandle [as _listen2] (node:net:1723:21)
at listenInCluster (node:net:1788:12)
at GetAddrInfoReqWrap.doListen [as callback] (node:net:1937:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:8)
error: script "dev" exited with code 1
3 Replies
Nico
Nico3mo ago
Looks like the main issue is it can’t use that port. It’s saying it doesn’t have permission So either it’s in use by another application or you don’t have admin privileges depending on the machine you running
king8fisher
king8fisher3mo ago
It does look like a permission error which is quite weird. I will try to run the command in a pure Terminal Actually it looks like 2 separate things: a warning and an error Solution to the error: add another port to the vite config
server: {
port: 3009
}
server: {
port: 3009
}
The warning is still there, but it seems to be harmless.
Nico
Nico3mo ago
That warning is because there’s no html to bundle yet It should go away once you build up up the project