Skip to content

npm install fails due to react dependency mismatch #46

@godmar

Description

@godmar

This project depends on React 19, but @frc-web-components/react 2.1.0 wants 18.3.1. When running

npm install

the error appended below results. To work around it, I need to force npm install --legacy-peer-deps.

Leaving this for comments.

24 error code ERESOLVE
25 error ERESOLVE could not resolve
26 error
27 error While resolving: @frc-web-components/react@2.1.0
27 error Found: react@19.0.0
27 error node_modules/react
27 error   react@"19.0.0" from the root project
27 error   peer react@">=16.8.0" from @emotion/react@11.14.0
27 error   node_modules/@emotion/react
27 error     @emotion/react@"^11.14.0" from the root project
27 error     peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.14.0
27 error     node_modules/@emotion/styled
27 error       @emotion/styled@"^11.14.0" from the root project
27 error       3 more (@mui/material, @mui/styled-engine, @mui/system)
27 error     3 more (@mui/material, @mui/styled-engine, @mui/system)
27 error   11 more (@emotion/styled, ...)
27 error
27 error Could not resolve dependency:
27 error peer react@"^18.3.1" from @frc-web-components/react@2.1.0
27 error node_modules/@frc-web-components/react
27 error   @frc-web-components/react@"^2.1.0" from the root project
27 error
27 error Conflicting peer dependency: react@18.3.1
27 error node_modules/react
27 error   peer react@"^18.3.1" from @frc-web-components/react@2.1.0
27 error   node_modules/@frc-web-components/react
27 error     @frc-web-components/react@"^2.1.0" from the root project
27 error
27 error Fix the upstream dependency conflict, or retry
27 error this command with --force or --legacy-peer-deps
27 error to accept an incorrect (and potentially broken) dependency resolution.
28 error

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