Skip to content

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

@NimaBakhtiyari

Description

@NimaBakhtiyari

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions