Should I be able to run `pages dev` on port 80?
When I try to
wrangler pages dev .svelte-kit/cloudflare --port 80
I get the following error:
Did I miss something in the docs about this or is this a bug? I did see this https://github.com/cloudflare/workers-sdk/issues/3676 but don't see triage or acknowledgement.
Thanks!GitHub
🐛 BUG: Uncaught exception when binding
pages dev
to port 80 or 44...Which Cloudflare product(s) does this pertain to? Wrangler core What version(s) of the tool(s) are you using? 3.3.0 What version of Node are you using? 20.5.0 What operating system are you using? M...
14 Replies
Just to make sure, do you have anything else using port 80? Sometimes there is a sneaky process using it, so then wrangler will fail to connect
I definitely don't, I checked
Was that with a browser, or via a networking tool?
I can double-check another way, I'll run vite on 80
via the terminal
well... lemme check my ports in use again, vite just puked too
Turns out an old wangler process is still holding on to the port…
lsof -i -P
is not showing anything listening to 80...
🤔 I'll check for any old wrangler processesWut
Yeah, I was just joking on that one, but idk, it has happened before
oh 😆 ok... well, there weren't any zombied wranglers
At a guess, maybe your system prevents you to use that port for some reason?
good thought, I'll dig around for that, I'm on mac
80 is typically a reserved port (anything under 1024) and requires root/admin access to run.
Have I borked something then? I’m on Mac too, but I don’t think it has ever asked for admin to start on :80
Mac might be different. I know on linux you need it or editing the port settings to allow non-root
Also depends on the program, stuff like docker runs as root so it doesn't need to ask to use the port
oh wow...
I had to
sudo vite dev --port 80
...
sheesh
low ports are not allowed by default on macOS
I was digging around when you posted this, you're right
I'll drop this info in the bug I referenced, thanks