ecs-dependency-injection icon indicating copy to clipboard operation
ecs-dependency-injection copied to clipboard

Conflicting peer dependencies: React ^16.8.1 || ^17 and React ^18

Open raaaahman opened this issue 2 years ago • 2 comments

What happened ?

When trying to install the game dependencies, I ran into an error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^18.1.0" from the root project
npm ERR!   peer react@"^18.1.0" from [email protected]
npm ERR!   node_modules/react-dom
npm ERR!     react-dom@"^18.1.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17" from [email protected]
npm ERR! node_modules/mobx-react-lite
npm ERR!   mobx-react-lite@"^3.3.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"^16.8.0 || ^17" from [email protected]
npm ERR!   node_modules/mobx-react-lite
npm ERR!     mobx-react-lite@"^3.3.0" from the root project

Steps to reproduce

  1. Clone the game repository
  2. Run npm install

Possible mitigation

Running npm install --force seems to create a working build for React. Should we just ignore NPM warnings?

Thank you for your time putting these examples anyway.

raaaahman avatar May 07 '22 08:05 raaaahman

@raaaahman Did you ever figure this out? I'm dealing with the exact same issue right now with Cypress instead of React.

david-renner-dwg avatar Aug 16 '22 16:08 david-renner-dwg

@david-renner-dwg Yes, running npm install --force still resulted in a working build for me.

raaaahman avatar Aug 31 '22 17:08 raaaahman