开发者

npm install on React project produces ERESOLVE

I had been attempting to update dependencies on an old project recently. Within my package.json file - I outline my npm and node version, as well as the dependencies I'm using:

"engines": {
    "npm": "9.x",
    "node": "14.x"
  },
  "dependencies": {
    "isomorphic-fetch": "^3.0.0",
    "jquery": "^3.3.1",
    "react": "^16.5.2",
    "react-dom": "^16.5.2",
    "react-google-charts": "^1.6.6",
    "react-scripts": "^2.1.3",
    "react-select": "^1.3.0",
    "react-toggle-display": "^2.2.0",
    "react-tooltip": "^3.8.4",
    "react-transition-group": "^4.4.5",
    "survey-react": "^0.12.36"
  }

When I run npm install; however, I'm met with a litany of errors regarding the packages I'm using.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-transition-group@4.4.5
npm ERR! Found: react@16.5.2
npm ERR! node_modules/react
npm ERR!   react@"^16.5.2" from the root pro开发者_如何学运维ject
npm ERR!   peer react@"^16.0.0" from react-dom@16.5.2
npm ERR!   node_modules/react-dom
npm ERR!     react-dom@"^16.5.2" from the root project
npm ERR!     peer react-dom@">=15.0.0" from react-google-charts@1.6.6
npm ERR!     node_modules/react-google-charts
npm ERR!       react-google-charts@"^1.6.6" from the root project
npm ERR!     2 more (react-select, react-tooltip)
npm ERR!   4 more (react-google-charts, react-input-autosize, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@">=16.6.0" from react-transition-group@4.4.5
npm ERR! node_modules/react-transition-group
npm ERR!   react-transition-group@"^4.4.5" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@18.2.0
npm ERR! node_modules/react
npm ERR!   peer react@">=16.6.0" from react-transition-group@4.4.5
npm ERR!   node_modules/react-transition-group
npm ERR!     react-transition-group@"^4.4.5" from the root project

I'm unsure what steps I should take to resolve this. Is this an issue with the version of react I'm currently using?


Run with npm install --legacy-peer-deps to avoid versioning between dependancies

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜