Skip to content

Netlify Dev Server doesn't start on Node 17.x/18.x #3617

@hrishikesh-k

Description

@hrishikesh-k

Describe the bug

Similar to this: #2882 (comment)

Netlify Dev tries to start a server, it injects the environment variables, parses the configuration files and starts the local server of the framework, however it never starts the Netlify CLI's server.

Till now, the behaviour has been observed with Vite and Create React App (but more frameworks could be affected). This has been observed on MacOS 12. Other Operating Systems have not been checked.

This works with Node 14.17.5, possibly with any other Node version than Node 17.

To Reproduce:

  1. Use Node 17 (17.0.1 at the time of writing).
  2. Try running netlify dev in a project (possibly in a Vite or CRA project)
  3. See that the dev server never starts.

Configuration

  System:
    OS: macOS 12.0.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 891.31 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 17.0.1 - ~/.nvm/versions/node/v17.0.1/bin/node
    npm: 8.1.1 - ~/.nvm/versions/node/v17.0.1/bin/npm

Expected behaviour

The Netlify Dev server should start.

CLI Output

Vite:

◈ Netlify Dev ◈
◈ Ignored general context env var: LANG (defined in process)
◈ Starting Netlify Dev with vite

> dev
> vite


  vite v2.4.1 dev server running at:

  > Local: http://localhost:3000/
  > Network: use `--host` to expose

  ready in 217ms.

Additional context

Marked low-priority as there's a workaround to use a different Node version.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions