Skip to content

Fix conflicting peer dependency error for react and react-test-renderer #590

@NewtonLC

Description

@NewtonLC

Describe the bug

There is a conflicting peer dependency error involving react, react-dom, and react-test-renderer when running npm install:

  • react and react-dom are specified as 18.2.0 or higher in package.json.
  • react-test-renderer is specified as ^18.3.1 in package.json.

When npm install is run with react at version 18.2.0, it throws a peer dependency conflict error. However, running the same command with react already installed at 18.3.1 does not result in this error.

Steps to Reproduce

  1. Set react (and react-dom) version to 18.2.0 in package.json.
  2. Ensure react-test-renderer version is set to ^18.3.1.
  3. Run npm install.
  4. Observe the conflicting peer dependency error.

Expected behavior

Installation should succeed without a peer dependency conflict if compatible versions are set in package.json.

Additional context

The conflicting dependency versions are:

  • react, react-dom: 18.2.0
  • react-test-renderer: ^18.3.1

Please review and align the version numbers as needed to resolve this issue.

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdependenciesPull requests that update a dependency file

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions