Shopify / hydrogen

Hydrogen lets you build faster headless storefronts in less time, on Shopify.
https://hydrogen.shop
MIT License
1.19k stars 241 forks source link

Fix: Override react version to ^18.3.1 #2049

Closed RcKeller closed 2 weeks ago

RcKeller commented 3 weeks ago

WHY are these changes introduced?

Fixes #2040

The issue is a blocker for all users attempting to create a new Hydrogen project, both by the cli and skeleton project.

WHAT is this pull request doing?

This hotfix bumps the version of react to the one @shopify/cli-kit is using. It is a non-breaking change for Hydrogen and a suitable hotfix to unblock users while core resolves the issues with CLI.

HOW to test your changes?

Post-merge steps

Checklist

RcKeller commented 3 weeks ago

I have signed the CLA!

frandiox commented 2 weeks ago

Hey 👋 Thanks for the PR. The main issue we're seeing is that @shopify/cli pins the version to 18.2.0. Therefore, our desired fix would be changing that package instead so that we don't force existing users to update to 18.3.1. The issue is reported here: https://github.com/Shopify/cli/issues/3800

I think in the meantime users should use NPM resolutions to pin React to 18.2.0 🤔

HeisUser commented 2 weeks ago

How to override to latest react version? My system is MacOS.

frandiox commented 2 weeks ago

Closing this since it is now fixed in the latest version 👍