Hi I have this problem where if I want to install react-spring into my react project It just pops up bunch of dependencies errors and warnings and I don't know what to do with it. I tried to check documentation of react-spring but I couldn't find anything. I checked few pages here on stackoverflow and I still did not find anything useful. Can somebody help?
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@17.0.2
npm WARN node_modules/react-spring/node_modules/react
npm WARN peer react@">=16.8" from @react-spring/konva@9.0.0
npm WARN node_modules/react-spring/node_modules/@react-spring/konva
npm WARN @react-spring/konva@"^9.0.0" from react-spring@9.0.0
npm WARN node_modules/react-spring
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"16.8.x" from react-konva@16.8.6
npm WARN node_modules/react-spring/node_modules/react-konva
npm WARN peer react-konva@">=16.8" from @react-spring/konva@9.0.0
npm WARN node_modules/react-spring/node_modules/@react-spring/konva
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@17.0.2
npm WARN node_modules/react-spring/node_modules/react
npm WARN peer react@">=16.8" from @react-spring/konva@9.0.0
npm WARN node_modules/react-spring/node_modules/@react-spring/konva
npm WARN @react-spring/konva@"^9.0.0" from react-spring@9.0.0
npm WARN node_modules/react-spring
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.0.0" from react-dom@16.8.6
npm WARN node_modules/react-spring/node_modules/react-dom
npm WARN peer react-dom@"16.8.x" from react-konva@16.8.6
npm WARN node_modules/react-spring/node_modules/react-konva
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: konva@7.2.5
npm WARN node_modules/konva
npm WARN peer konva@">=2.6" from @react-spring/konva@9.0.0
npm WARN node_modules/react-spring/node_modules/@react-spring/konva
npm WARN @react-spring/konva@"^9.0.0" from react-spring@9.0.0
npm WARN node_modules/react-spring
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer konva@"^3.2.3" from react-konva@16.8.6
npm WARN node_modules/react-spring/node_modules/react-konva
npm WARN peer react-konva@">=16.8" from @react-spring/konva@9.0.0
npm WARN node_modules/react-spring/node_modules/@react-spring/konva
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-spring@9.0.0
npm WARN Found: react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN peerOptional react-dom@">=17.0" from @react-three/fiber@6.0.1
npm WARN node_modules/@react-three/fiber
npm WARN peer @react-three/fiber@">=6.0" from @react-spring/three@9.0.0
npm WARN node_modules/@react-spring/three
npm WARN
npm WARN Could not resolve dependency:
npm WARN peerOptional react-dom@">=17.0" from @react-three/fiber@6.0.1
npm WARN node_modules/@react-three/fiber
npm WARN peer @react-three/fiber@">=6.0" from @react-spring/three@9.0.0
npm WARN node_modules/@react-spring/three
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! peer react@"*" from @testing-library/react@11.2.5
npm ERR! node_modules/@testing-library/react
npm ERR! @testing-library/react@"^11.2.5" from the root project
npm ERR! peer react@"17.0.1" from react-dom@17.0.1
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@"*" from @testing-library/react@11.2.5
npm ERR! node_modules/@testing-library/react
npm ERR! @testing-library/react@"^11.2.5" from the root project
npm ERR! peer react-dom@">=16.0.0" from react-visibility-sensor@5.1.1
npm ERR! node_modules/react-visibility-sensor
npm ERR! react-visibility-sensor@"^5.1.1" from the root project
npm ERR! 1 more (the root project)
npm ERR! 4 more (react-scripts, react-visibility-sensor, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.2" from react-reconciler@0.26.2
npm ERR! node_modules/@react-three/fiber/node_modules/react-reconciler
npm ERR! react-reconciler@"^0.26.2" from @react-three/fiber@6.0.1
npm ERR! node_modules/@react-three/fiber
npm ERR! peer @react-three/fiber@">=6.0" from @react-spring/three@9.0.0
npm ERR! node_modules/@react-spring/three
npm ERR! @react-spring/three@"^9.0.0" from react-spring@9.0.0
npm ERR! node_modules/react-spring
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! See C:\...\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
The issue is with npm7 requiring peer deps to be installed. This is a feature of npm7, not a bug. react-spring
is the global package for the library and therefore contains all our targets. Unless you really are doing an app that requires zDog
, konva
etc. I would install the specific target you're after.
i.e npm install @react-spring/web
the /* can be replaced with any target we support, for more information please see the docs