framework-info icon indicating copy to clipboard operation
framework-info copied to clipboard

ntl dev hangs and times out waiting for port 3000 when a project uses vite as a build tool

Open nickytonline opened this issue 1 year ago • 1 comments

Thanks for reporting this bug!

Please search other issues to make sure this bug has not already been reported.

Then fill in the sections below.

Describe the bug

  1. From a shell, create a new project using vite by running npm create vite@latest
  2. Use the default project name vite-project or enter a new one.
➜ npm create vite@latest
✔ Project name: … vite-project
? Select a framework: › - Use arrow-keys. Return to submit.
❯   vanilla
    vue
    react
    preact
    lit
    svelte
  1. It doesn't matter which project type you choose, but I chose React
  2. change to the new folder, e.g. vite-project
  3. run npm run dev
  4. a React vite based app loads uo
  5. Stop the server by pressing CTRL + C
  6. run ntl dev
  7. the vite based server starts up, but the Netlify CLI is hanging waiting for port 3000
➜ ntl dev
◈ Netlify Dev ◈
◈ Ignored general context env var: LANG (defined in process)
◈ Starting Netlify Dev with Vite

> [email protected] dev
> vite


  VITE v3.0.2  ready in 5255 ms

  ➜  Local:   http://127.0.0.1:5173/
  ➜  Network: use --host to expose
⠧ Waiting for framework port 3000. This can be configured using the 'targetPort' property in the netlify.toml

Configuration

N/A

Pull requests

Pull requests are welcome! If you would like to help us fix this bug, please check our contributions guidelines.

nickytonline avatar Jul 22 '22 20:07 nickytonline

I'm going to also validate if this affects the frameworks that use vite and have their own framework info configuration, e.g. Hydrogen.

nickytonline avatar Jul 22 '22 20:07 nickytonline