Open yuxiangning opened 1 year ago
Hey! ๐ Thanks for reporting this, and apologies for the delayed response. I'd recommend using the --proxy
flag if you know what port your server is going to start on (e.g. wrangler pages dev --proxy 5000
). It looks like we might need to use an alternative tool though if running inside a Docker container. ๐
Which Cloudflare product(s) does this pertain to?
Wrangler core
What version(s) of the tool(s) are you using?
3.6.0
What version of Node are you using?
v20.5.1
What operating system are you using?
Linux 5.15.90.1-microsoft-standard-WSL2
Describe the Bug
While developing a page project inside nodejs container that has nothing else running, I met the following errors with
npm run pages:dev
.Turns out the output of
lsof -nPi
returns nothing from the container, and it seems the parse logic from https://github.com/cloudflare/workers-sdk/blob/c053403b77fc6e2a4b99a934e8e57bd2593df798/packages/wrangler/src/pages/dev.ts#L697 doesn't quite consider empty result.I can work around this by running a
iperf3 -s
to occupy a port such that the lsof error will be gone, but the proxy error is still there, need to dig more into that. Please feel free to correct me though.Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
โ [ERROR] Error scanning for ports of process with PID 84759: Error: Command failed: lsof -nPi
โ [ERROR] Error scanning for ports of process with PID 84775: Error: Command failed: lsof -nPi
โ [ERROR] Error scanning for ports of process with PID 84776: Error: Command failed: lsof -nPi
โ [ERROR] Error scanning for ports of process with PID 84787: Error: Command failed: lsof -nPi
โ [ERROR] Could not automatically determine proxy port. Please specify the proxy port with --proxy.