vercel: `vercel dev` in Vite app causes port timeout
I get the following error after a while running vercel dev in a Vite/SvelteKit app:
Error! Detecting port 62323 timed out after 300000ms
Error! An unexpected error occurred!
Error: Detecting port 62323 timed out after 300000ms
at checkForPort (/Users/kabir/Library/pnpm/global/5/.pnpm/vercel@27.0.0/node_modules/vercel/dist/index.js:243842:19)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at DevServer.runDevCommand (/Users/kabir/Library/pnpm/global/5/.pnpm/vercel@27.0.0/node_modules/vercel/dist/index.js:243643:9)
at DevServer._start (/Users/kabir/Library/pnpm/global/5/.pnpm/vercel@27.0.0/node_modules/vercel/dist/index.js:243267:9)
Error! An unexpected error occurred!
Error: Detecting port 62323 timed out after 300000ms
at checkForPort (/Users/kabir/Library/pnpm/global/5/.pnpm/vercel@27.0.0/node_modules/vercel/dist/index.js:243842:19)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at DevServer.runDevCommand (/Users/kabir/Library/pnpm/global/5/.pnpm/vercel@27.0.0/node_modules/vercel/dist/index.js:243643:9)
at DevServer._start (/Users/kabir/Library/pnpm/global/5/.pnpm/vercel@27.0.0/node_modules/vercel/dist/index.js:243267:9)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (7 by maintainers)
Commits related to this issue
- [cli] Poll the Dev Command server on both IPv4 and IPv6 in `vc dev` This change will allow the downstream Dev Command server be able to listen on either of `127.0.0.1` for IPv4 or `[::1]` for IPv6. ... — committed to vercel/vercel by TooTallNate 4 years ago
- [cli] Poll the Dev Command server on both IPv4 and IPv6 in `vc dev` (#8542) This change will allow the downstream Dev Command server be able to listen on either of `127.0.0.1` for IPv4 or `[::1]` for... — committed to vercel/vercel by TooTallNate 4 years ago
- chore(docs): scrap `vc dev` usage - https://vercel.com/docs/cli/dev - vercel/vercel#8121 Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc> — committed to flex-development/mlly by unicornware 4 years ago
using sveltekit and vercel cli and encountered this issue on a new os install with all the latest tools
The workaround is to use
vite --port $PORT --host 0.0.0.0as your development command.I think we’ll need to update
vercel devto support both ipv4 and ipv6 as more frameworks change to ipv6.It took me a long time to realize this was referring to the dev command in your vercel account project settings! I was banging my head against the wall trying with the local
package.json🙃The fix is available on the latest version of Vercel CLI
Working beautifully, thanks for besing & dosing @styfle & @TooTallNate!