A search of issues reveals this is briefly mentioned in someone's feedback in #1047 , but I figured it's worth having its own issue.
rustc -V: rustc 1.41.0 (5e1a79984 2020-01-27)node -v: v12.16.2wrangler -V: 👷 ✨ wrangler 1.9.0wrangler.toml: name = "typescript-demo"
type = "webpack"
account_id = "e733c486ff936cfb7cdf644badc953e2"
workers_dev = true
route = ""
zone_id = ""
webpack_config = "webpack.config.js"
wrangler project.wrangler devwrangler devA polite error message and a graceful shutdown.
➜ wrangler dev
[ truncated ]
⬇️ Installing wranglerjs...
⬇️ Installing wasm-pack...
Warning: webpack's output filename is being renamed to worker.js because of requirements from the Workers runtime
✨ Built successfully, built project size is 5 KiB.
thread 'tokio-runtime-worker' panicked at 'error binding to 127.0.0.1:8787: error creating server listener: Address already in use (os error 48)', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.13.5/src/server/mod.rs:124:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
⬇️ Installing wranglerjs...
Error: panic
@EverlastingBugstopper there should be a function we can pull up from /tail for gracefully assigning ports.
I think for this one we should just have an error message letting them know that they should re-run dev with another port instead of auto-provisioning one since it's user facing.
fwiw the function in question errors if a preferred port is passed: https://github.com/cloudflare/wrangler/blob/master/src/commands/tail/mod.rs#L30
cool ill throw it in utils