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

Meta migrate to react 19 #7349

Open
AugustinMauroy opened this issue Dec 22, 2024 · 2 comments
Open

Meta migrate to react 19 #7349

AugustinMauroy opened this issue Dec 22, 2024 · 2 comments
Assignees

Comments

@AugustinMauroy
Copy link
Member

AugustinMauroy commented Dec 22, 2024

We want to keep us up to date with our framework we need to upgrade react to v19.

But let's look at the known problems that are blocking us:

  • @orama/[email protected] who don't have react 19 supported in peerdep
  • @storybook/react may have issue with react 19
Image
@AugustinMauroy AugustinMauroy self-assigned this Dec 22, 2024
@Harkunwar
Copy link
Contributor

I tried taking a stab at this and was able to successfully upgrade the repo to React 19 and everything seems to be working alright.

Issues I faced:

  • The latest version of storybook 8.4.7 threw tons of errors, so I tried their latest beta version, 8.5.0-beta.5, which made a few components render.
  • React 18.3.1 was still being installed even after changing the version to 19.0.0 in package.json at the root node_modules. This made storybook throw tons of errors related to multiple versions of react present. Resolved it by running npm install --legacy-peer-deps as the error came from @orama/react-components not supporting 19.0.0. This install command is a bit risky though since it updated lots of other packages in package-lock.json, but overall seemed okay.
  • After this, storybook started complaining and wasn't compiling anymore, giving an error that it wasn't able to find react. After some investigation, realized it was looking for react at the root node_modules instead of node_modules at apps/site. Quick fix was to add react and react-dom with version 19.0.0 to root package.json which created a copy of react and react-dom in the root node modules.

I think we should hold onto the upgrade before storybook releases the version 8.5.0, and @orama/react-components updates the peer dependency for react 19 support.

@AugustinMauroy
Copy link
Member Author

Im in favour of waiting little bit. I opened an isssue on orama repo for react 19

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

No branches or pull requests

2 participants