简体   繁体   中英

Npm error. Unableto install package. Keeps throwing error

Getting the below error when running npm install

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.0
npm ERR! npm  v2.14.20
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package react@16.13.1 does not satisfy its siblings' pe
erDependencies requirements!
npm ERR! peerinvalid Peer ag-grid-react@13.2.0 wants react@^15.5.0
npm ERR! peerinvalid Peer react-bootstrap@0.30.8 wants react@>=0.14.0
npm ERR! peerinvalid Peer react-tagsinput@3.19.0 wants react@^16.0.0 || ^15.0.0
|| ^0.14.0
npm ERR! peerinvalid Peer react-notification-system@0.2.17 wants react@0.14.x ||
 ^15.0.0 || ^16.0.0
npm ERR! peerinvalid Peer react-select-fast-filter-options@0.2.3 wants react@^0.
14.0 || ^15.0.0 || ^16.0.0-a
npm ERR! peerinvalid Peer react-motion@0.5.2 wants react@^0.14.9 || ^15.3.0 || ^
16.0.0
npm ERR! peerinvalid Peer react-select@1.3.0 wants react@^0.14.9 || ^15.3.0 || ^
16.0.0-rc || ^16.0
npm ERR! peerinvalid Peer react-dom@15.6.2 wants react@^15.6.2

npm ERR! Please include the following file with any support request:

I solved the above error by adding react ^15.3.0 as an explicit dependency in the package.json but now I am receiving the below error which is not being resolved even after adding explicit dependencies.

npm WARN package.json ExperimentUI@1.0.0 No repository field.
npm WARN package.json ExperimentUI@1.0.0 No license field.
npm WARN prefer global npm@6.14.5 should be installed with -g
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.0
npm ERR! npm  v2.14.20
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package webpack@1.15.0 does not satisfy its siblings' p
eerDependencies requirements!
npm ERR! peerinvalid Peer file-loader@6.0.0 wants webpack@^4.0.0 || ^5.0.0
npm ERR! peerinvalid Peer babel-loader@6.4.1 wants webpack@1 || 2 || ^2.1.0-beta
 || ^2.2.0-rc

npm ERR! Please include the following file with any support request:

Below is my package.json, could you please help me by pointing me in the right direction

{
  "name": "",
  "version": "1.0.0",
  "description": "",
  "author": "",
  "dependencies": {
    "react": "^15.3.0",
    "ag-grid": "13.2.0",
    "ag-grid-react": "13.2.0",
    "re-resizable": "^4.7.1",
    "react-bootstrap": "0.30.8"
  },
  "devDependencies": {
    "ag-grid-enterprise": "13.2.0",
    "axios": "^0.16.1",
    "file-loader": "^6.0.0",
    "babel-loader": "^6.2.4",
    "babel-polyfill": "^6.22.0",
    "babel-preset-es2015": "^6.6.0",
    "babel-preset-react": "^6.5.0",
    "babel-runtime": "^6.25.0",
    "create-react-class": "^15.5.2",
    "css-loader": "0.23.1",
    "es6-promise": "^3.1.2",
    "jQuery-QueryBuilder": "^2.4.5",
    "jquery": "^3.3.1",
    "json-loader": "^0.5.4",
    "moment": "^2.18.1",
    "moment-timezone": "^0.5.13",
    "prop-types": "^15.5.8",
    "rc-slider": "^8.5.0",
    "react-color": "^2.14.1",
    "react-draggable": "^3.0.5",
    "react-motion": "^0.5.0",
    "react-notification-system": "^0.2.14",
    "react-select": "^1.0.0-rc.3",
    "react-select-fast-filter-options": "^0.2.1",
    "react-tagsinput": "^3.16.1",
    "storm-react-diagrams": "^5.2.1",
    "style-loader": "0.13.0",
    "url-loader": "^0.5.7",
    "victory": "^0.19.1",
    "webpack": "^1.15.0"
  }
}

Welcome to Stack Overflow. Unfortunately your node version seems very old. With your package.json I was not able to install your dependancies either (using node v4.4.x , npm v2.14.x ).

Since create-react-app uses Node >= 8.10 and npm >= 5.6 I would recommend you stick with these versions and above. Most dependancies will be fine then.

Don't forget to approve an answer if you're happy with it and good luck coding.

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