-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Netlify Dev Server doesn't start on Node 17.x/18.x #3617
Comments
In case someone would like to pick this up, the line we wait for the framework server (e.g. Vite) is here: Line 104 in 51e7b69
|
@erezrokah This might be related to vitejs/vite#5365?
|
@tinfoil-knight woo - great find. This was also reported for @LuskeyNoah does reverting to Node.js < 17 work for you? |
I just created a bare CRA project and it doesn't seem to be working with Node 17 at all. Here's the log:
Doesn't seem to be related to CLI. The setup works with Node 16. I believe this is because Webpack doesn't play well with Node 17 yet. |
I have encountered this as well with a Hugo site: https://answers.netlify.com/t/netlify-dev-server-not-starting-for-hugo-site/47222 One interesting bit is that it works the first time I try after rebooting my machine (I have to navigate to the Hugo-launched page first, and that will trigger it to launch the Netlify server on port 8888), but after killing the server I can't get it back up again without rebooting. After installing Node v16, it is working as expected. I don't even have to navigate to the Hugo-launched port. |
Yes, reverting to node 16 LTS fixes the issue for me. |
Reported for Vue too in #3772 |
Is this still current? |
@MincePie Yes, seems so. With |
Also bumped into this problem recently and reverted Node to v16. brew uninstall --ignore-dependencies node
brew install node@16
brew link node@16 |
Can confirm that this issue also persists on Node 18 as well. My app uses seanc ⋊> ~/c/nav-credit-card-update git:(main) node -v 11:49:22
v18.0.0
seanc ⋊> ~/c/nav-credit-card-update git:(main) netlify dev 11:49:24
◈ Netlify Dev ◈
◈ Ignored build settings env var: REACT_APP_API_BASE_URL_V3 (defined in .env file)
◈ Injected .env file env var: REACT_APP_API_BASE_URL_V3
◈ Ignored build settings env var: V3_AUTH_URL (defined in .env file)
◈ Injected .env file env var: V3_AUTH_URL
◈ Ignored build settings env var: V3_CLIENT_ID (defined in .env file)
◈ Injected .env file env var: V3_CLIENT_ID
◈ Ignored build settings env var: V3_CLIENT_SECRET (defined in .env file)
◈ Injected .env file env var: V3_CLIENT_SECRET
◈ Ignored build settings env var: REACT_APP_QA_API_BASE_URL_V3 (defined in .env file)
◈ Injected .env file env var: REACT_APP_QA_API_BASE_URL_V3
◈ Ignored build settings env var: QA_V3_AUTH_URL (defined in .env file)
◈ Injected .env file env var: QA_V3_AUTH_URL
◈ Ignored build settings env var: QA_V3_CLIENT_ID (defined in .env file)
◈ Injected .env file env var: QA_V3_CLIENT_ID
◈ Ignored build settings env var: QA_V3_CLIENT_SECRET (defined in .env file)
◈ Injected .env file env var: QA_V3_CLIENT_SECRET
◈ Injected .env file env var: REACT_APP_API_BASE_URL
◈ Injected .env file env var: REACT_APP_V3_AUTH_URL
◈ Injected .env file env var: REACT_APP_DEVELOPMENT
◈ Injected .env file env var: SERVER_PORT
◈ Loaded function GetTokenV3 http://localhost:8888/.netlify/functions/GetTokenV3.
◈ Functions server is listening on 57852
◈ Starting Netlify Dev with Create React App
yarn run v1.22.18
$ react-scripts start
ℹ 「wds」: Project is running at http://0.0.0.0:3000/
ℹ 「wds」: webpack output is served from
ℹ 「wds」: Content not from webpack is served from /Users/seanc/code/nav-credit-card-update/public
ℹ 「wds」: 404s will fallback to /
Starting the development server...
Compiled successfully!
You can now view nav-reservation-cc-update in the browser.
http://localhost:3000
Note that the development build is not optimized.
To create a production build, use yarn build. |
Wow glad I found this, it was driving me nuts. Using an empty base Astro project, I downgraded to node16 and it works now. If you are using conda, this one is 16.13.1: That issue would gain being advertised more widely and if possible a test in netlify cli added to inform users of the issue. Thanks for sharing! |
Just came back to say that this seems to be the case for Node 18 too. It doesn't work reliably. I thought someone else might have reported by now, but since no one had, just adding a note here. EDIT: I noticed someone else has noted this above. |
also having this issue with node 18! |
Its rekt for me too....lets get it going @sw-yx |
Fails for us using nvm with the following:
|
Hey, guys, what's up? I am getting this error too... Even using Node LTS version or the latest now (19.7.0) |
Note 18 is working fine, I haven't checked with Node 19 yet. Could you share the output you get when running |
Doesn't see related to this issue. Please open another one or write in Netlify Forums: https://answers.netlify.com/ |
In Gatsby v4 and Node v18. Running |
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:
netlify dev
in a project (possibly in a Vite or CRA project)Configuration
Expected behaviour
The Netlify Dev server should start.
CLI Output
Vite:
Additional context
Marked
low-priority
as there's a workaround to use a different Node version.The text was updated successfully, but these errors were encountered: