Skip to content
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

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

Open
2 tasks done
anastasiyaArk opened this issue Sep 6, 2024 · 1 comment
Open
2 tasks done
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby

Comments

@anastasiyaArk
Copy link

anastasiyaArk commented Sep 6, 2024

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

@anastasiyaArk anastasiyaArk added the type: bug An issue or pull request relating to a bug in Gatsby label Sep 6, 2024
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 6, 2024
@anastasiyaArk
Copy link
Author

duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

1 participant