简体   繁体   中英

Can't install react-transition-group

Trying to install react-transition-group but get the following error

npm install react-transition-group@1.x --save


npm ERR! peerinvalid The package react@15.6.1 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer react-bootstrap@0.31.0 wants react@^0.14.9 || >=15.3.0
npm ERR! peerinvalid Peer react-dom@15.6.1 wants react@^15.6.1
npm ERR! peerinvalid Peer react-fontawesome@1.6.1 wants react@>=0.12.0
npm ERR! peerinvalid Peer react-redux@5.0.5 wants react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0
npm ERR! peerinvalid Peer react-router@4.1.1 wants react@^15
npm ERR! peerinvalid Peer react-router-dom@4.1.1 wants react@^15
npm ERR! peerinvalid Peer react-simple-currency@1.0.15 wants react@^0.14.0
npm ERR! peerinvalid Peer react-transition-group@1.2.0 wants react@^15.0.0

The current dependencies in packages.json are

 "dependencies": {
    "accounting": "0.4.1",
    "babel-runtime": "^6.20.0",
    "css-loader": "0.28.2",
    "history": "4.6.1",
    "immutable": "3.8.1",
    "jsonapi-serializer": "3.5.3",
    "numeral": "2.0.6",
    "prop-types": "15.5.10",
    "react": "^15.3.0",
    "react-bootstrap": "0.31.0",
    "react-dom": "^15.4.1",
    "react-fontawesome": "1.6.1",
    "react-redux": "5.0.5",
    "react-router": "4.1.1",
    "react-router-dom": "4.1.1",
    "redux": "3.6.0",
    "sprintf-js": "1.1.1",
    "style-loader": "0.18.1",
    "superagent": "3.5.2",
    "superagent-no-cache": "0.1.1",
    "zpad": "0.5.0"
  },
  1. Updated npm npm install npm -g
  2. Cleared cache: npm cache clear
  3. Removed node_modules rm -rf node_modules
  4. Reinstalled node_modules, npm install .

just execute the command: npm install react-transition-group

and it will work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM