pmndrs / react-spring

✌️ A spring physics based React animation library
http://www.react-spring.dev/
MIT License
27.9k stars 1.19k forks source link

Impossible to install --save with react 17.0.1 #1415

Closed Julienblc closed 3 years ago

Julienblc commented 3 years ago

## 🐛 Bug Report

Hello,

I'm trying to install react-spring, but i have an error when I use npm install react-spring --save

Here is my error :

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR!   peer react@">=16.8" from @react-spring/core@9.1.0
npm ERR!   node_modules/@react-spring/core
npm ERR!     @react-spring/core@"^9.1.0" from react-spring@9.1.0
npm ERR!     node_modules/react-spring
npm ERR!       react-spring@"*" from the root project
npm ERR!     @react-spring/core@"^9.1.0" from @react-spring/konva@9.1.0
npm ERR!     node_modules/react-spring/node_modules/@react-spring/konva
npm ERR!       @react-spring/konva@"^9.1.0" from react-spring@9.1.0
npm ERR!       node_modules/react-spring
npm ERR!         react-spring@"*" from the root project
npm ERR!   1 more (@react-spring/konva)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0.0" from react-reconciler@0.20.4
npm ERR! node_modules/react-zdog/node_modules/react-reconciler
npm ERR!   react-reconciler@"^0.20.4" from react-zdog@1.0.11
npm ERR!   node_modules/react-zdog
npm ERR!     peer react-zdog@">=1.0" from @react-spring/zdog@9.1.0
npm ERR!     node_modules/@react-spring/zdog
npm ERR!       @react-spring/zdog@"^9.1.0" from react-spring@9.1.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 /Users/me/.npm/eresolve-report.txt for a full report.```

I tried with react 17.0.2 but having the same issue.

## Environment

My package.json : 

```{
  "name": "my-name",
  "version": "1.0.0",
  "scripts": {
    "dev": "next",
    "build": "next build",
    "start": "next start",
    "type-check": "tsc",
    "storybook": "start-storybook -p 6006",
    "build-storybook": "build-storybook"
  },
  "dependencies": {
    "@material-ui/core": "^4.11.3",
    "@material-ui/styles": "^4.11.3",
    "babel-plugin-styled-components": "^1.12.0",
    "cookie": "^0.4.1",
    "date-fns": "^2.19.0",
    "i18n-js": "^3.8.0",
    "lottie-react": "^2.1.0",
    "next": "latest",
    "react": "^17.0.1",
    "react-cookie": "^4.0.3",
    "react-dom": "^17.0.1",
    "react-elastic-carousel": "^0.11.3",
    "styled-components": "^5.2.1",
    "superjson": "^1.7.3"
  },
  "devDependencies": {
    "@babel/core": "^7.13.10",
    "@storybook/addon-actions": "^6.1.21",
    "@storybook/addon-essentials": "^6.1.21",
    "@storybook/addon-links": "^6.1.21",
    "@storybook/react": "^6.1.21",
    "@svgr/webpack": "^5.5.0",
    "@types/i18n-js": "^3.8.0",
    "@types/node": "^12.12.21",
    "@types/react": "^17.0.2",
    "@types/react-dom": "^17.0.1",
    "@types/styled-components": "^5.1.9",
    "babel-loader": "^8.2.2",
    "babel-plugin-superjson-next": "^0.2.3",
    "typescript": "4.0",
    "url-loader": "^4.1.1"
  }
}
joshuaellis commented 3 years ago

duplicate - see https://github.com/pmndrs/react-spring/issues/1413#issuecomment-817623929