gatsbyjs/gatsby

Gatsby Incorrectly Detecting Node.js v16.13.0 Instead of Installed v20.17.0

Closed this issue · 3 comments

Preliminary Checks

Issue Description

I am encountering a problem with Gatsby while trying to start a project. I get an error "Gatsby requires Node.js 18.0.0 or higher (you have v16.13.0)" when running npm run develop. Despite having the recent version of nodejs installed, Gatsby seems to be detecting Node.js v16.13.0, which I don't even have installed on my machine.

Steps Taken So Far

  1. Verified the Node.js version using node -v, which returns v20.17.0.
  2. Checked installed Node.js versions with nvm ls, and it only lists v20.17.0.
  3. Used where node to check for conflicting Node.js versions but couldn’t find any installation of v16.13.0.
  4. Uninstalled and installing a nodejs.
  5. Cleared the Gatsby cache using gatsby clean and reinstalled all dependencies (npm install).

Additional Information

  • I have ensured that all PATH environment variables are pointing to the correct Node.js installation.
  • I have restarted my system after making changes to ensure they take effect.

Could this be a cached environment issue? Are there any other places where Gatsby could be picking up this outdated version of Node.js?

Reproduction Link

private repo

Steps to Reproduce

  1. npm run develop

Expected Result

Gatsby should detect and use Node.js v20.17.0 when running the project.

Actual Result

Gatsby is still showing the following error: Gatsby requires Node.js 18.0.0 or higher (you have v16.13.0)
However, I do not have Node.js v16 installed, and I am running Node.js v20.17.0.

Environment

- **OS**: Windows 11 64-bit
- **Node.js version**: 20.17.0
- **Gatsby version**: 5.13.7
- **npm version**: 10.5.0

Config Flags

No response

duplicate

duplicate

is these issue still exists.. @anastasiyaArk

@pavan-gopala the issue can be closed