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

Peer Dependency Conflict: react-side-effect (via react-helmet) not compatible with React v19 #716

Open
NimaBakhtiyari opened this issue Feb 8, 2025 · 0 comments

Comments

@NimaBakhtiyari
Copy link

We are experiencing a peer dependency conflict when using React v19.0.0. The issue arises from the dependency chain in which:

  • react-helmet (v6.1.0) depends on react-side-effect (v2.1.2), and
  • react-side-effect requires React to be one of: ^16.3.0 || ^17.0.0 || ^18.0.0.

Since our project uses React v19.0.0, npm reports this conflict and forces us to either override peer dependencies using --legacy-peer-deps or downgrade React to a supported version.

Error Example

npm warn While resolving: [email protected] npm warn Found: [email protected] npm warn node_modules/react npm warn react@"^19.0.0" from the root project npm warn 19 more (@emotion/react, @emotion/styled, ...) npm warn npm warn Could not resolve dependency: npm warn peer react@"^16.3.0 || ^17.0.0 || ^18.0.0" from [email protected] npm warn node_modules/react-helmet/node_modules/react-side-effect npm warn react-side-effect@"^2.1.0" from [email protected] npm warn node_modules/react-helmet

Impact

While our project currently builds and runs (especially using the --legacy-peer-deps flag), ignoring this conflict could lead to unexpected behavior during future dependency upgrades, runtime issues, or production builds. Relying on overridden peer dependency resolution is not ideal for ensuring long-term stability.

Suggested Fix

  • Update Approach: Update react-helmet and its dependency react-side-effect to support React v19.
  • Documentation: Alternatively, provide updated documentation indicating that React v19 is not officially supported or advise users to use a compatible React version.
  • Version Release: Consider releasing a new major version of react-helmet (and consequently react-side-effect) that explicitly supports React v19.

Steps to Reproduce

  1. Create a project with the following dependencies in package.json:
    • "react": "^19.0.0"
    • "react-helmet": "^6.1.0"
  2. Run npm install.
  3. Observe the peer dependency error regarding react-side-effect.

Environment Details

  • React version: 19.0.0
  • react-helmet version: 6.1.0 (with [email protected])
  • Node version: v22.13.1
  • npm version: 11.0.0
  • OS: Windows

Please let me know if further details or logs are needed.

Thanks for your help!

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

1 participant