question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`vercel dev` in Vite app causes port timeout

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
styflecommented, Aug 24, 2022

The workaround is to use vite --port $PORT --host 0.0.0.0 as your development command.

I think we’ll need to update vercel dev to support both ipv4 and ipv6 as more frameworks change to ipv6.

1reaction
unitofcommented, Sep 10, 2022

Working beautifully, thanks for besing & dosing @styfle & @TooTallNate!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Errors – Vercel Docs
504: Gateway Timeout Code: EDGE_FUNCTION_INVOCATION_TIMEOUT. A common cause for this issue is when the application contains an unhandled exception.
Read more >
Serverless Functions – Vercel Docs
The timeout is determined by the "Serverless Function Execution Timeout (Seconds)" limit, which is based on the plan that the Personal Account, or...
Read more >
What can I do about Vercel Serverless Functions timing out?
Sometimes you may find that your Functions are exceeding the execution limits and returning a timeout error. Read on to learn what you...
Read more >
Project Config with vercel.json
A complete reference for Vercel project configurations using vercel.json. ... Note: If you are using Next.js and running vercel dev , you will...
Read more >
Introducing `vercel dev` – Serverless, on localhost
With Vercel CLI's new `vercel dev` command, you can locally work on Vercel applications easily, without having to deploy them.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found