Skip to content

fix: unblock npm install by overriding sharp & node-gyp versions#3

Open
SinghCod3r wants to merge 1 commit into
Riminder:masterfrom
SinghCod3r:fix/sharp-nodegyp-install
Open

fix: unblock npm install by overriding sharp & node-gyp versions#3
SinghCod3r wants to merge 1 commit into
Riminder:masterfrom
SinghCod3r:fix/sharp-nodegyp-install

Conversation

@SinghCod3r
Copy link
Copy Markdown

❗ Problem

Fresh npm install failed with:

  • node-gyp 3.8.0 expects Python 2, which triggers the “Missing parentheses in call to 'print'” error under Python 3 / Node 18+.
  • sharp 0.24.x (pulled in via Gatsby-v2 plugins) also relies on that old node-gyp toolchain.

🔧 Fix

Added an overrides block in package.json to force modern, Python-3-compatible versions:

"overrides": {
  "sharp": "^0.32.4",
  "node-gyp": "^9.4.0"
}

These versions ship pre-built binaries or build correctly with Python 3, eliminating the install failure.

✅ Testing

  1. Removed node_modules and package-lock.json.
  2. Ran npm install with Node 18 — completed successfully.
  3. Ran gatsby develop — site builds and loads without regressions.

📖 References

  • sharp install issues under Node 18
  • node-gyp Python 3 compatibility notes

Please review & merge so new contributors can install the project without extra setup. 🎉

closes #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error during installation

1 participant