Skip to content

React version conflict #29

@saiy2k

Description

@saiy2k

Hi,

I just cloned the repo and did npm install.

Got the following message:

~/testground/incode-react-example main !2 ?2 ❯ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @incodetech/welcome@1.57.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from the root project
npm ERR!   peer react@"*" from @testing-library/react@11.2.7
npm ERR!   node_modules/@testing-library/react
npm ERR!     @testing-library/react@"^11.1.0" from the root project
npm ERR!   9 more (framer-motion, react-dom, react-modal, react-pdf, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.2" from @incodetech/welcome@1.57.0
npm ERR! node_modules/@incodetech/welcome
npm ERR!   @incodetech/welcome@"^1.57.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react@17.0.2
npm ERR! node_modules/react
npm ERR!   peer react@"^17.0.2" from @incodetech/welcome@1.57.0
npm ERR!   node_modules/@incodetech/welcome
npm ERR!     @incodetech/welcome@"^1.57.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/saiy2k/.npm/_logs/2023-07-26T10_13_35_149Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/saiy2k/.npm/_logs/2023-07-26T10_13_35_149Z-debug-0.log

I had tonpm i --legacy-peer-deps to have both react-18 and react-17.0.2, to make the app working. Is this expected?

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