突然间,发生了这种情况:
$ npm install history
npm ERR! Linux 3.13.0-76-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "history"
npm ERR! node v4.4.0
npm ERR! npm v2.14.20
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package history@1.13.1 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer react-router@1.0.3 wants history@^1.17.0
...当我尝试安装时,几乎任何东西。我尝试安装react-bootstrap
,遇到此错误,并尝试升级历史记录。我不知道该怎么做。
我试过npm i -S history@1.17.0
无济于事。同样的错误。
这是我的package.json
:
"dependencies": {
"bootstrap-loader": "1.0.9",
"bootstrap-sass": "3.3.6",
"connect-history-api-fallback": "1.1.0",
"css-loader": "0.23.1",
"font-awesome": "4.5.0",
"font-awesome-webpack": "0.0.4",
"node-sass": "3.4.2",
"object-assign": "4.0.1",
"react": "0.14.7",
"react-dom": "0.14.7",
"react-redux": "4.4.0",
"react-router": "2.0.0",
"redux": "3.3.1",
"redux-api-middleware": "1.0.1",
"redux-thunk": "2.0.1",
"resolve-url-loader": "1.4.3",
"sass-loader": "3.2.0",
"style-loader": "0.13.0",
"url-loader": "0.5.7"
},
"devDependencies": {
"babel-cli": "6.5.1",
"babel-core": "6.5.1",
"babel-eslint": "5.0.0",
"babel-loader": "6.2.3",
"babel-plugin-react-display-name": "2.0.0",
"babel-plugin-react-transform": "2.0.0",
"babel-preset-es2015": "6.5.0",
"babel-preset-react": "6.5.0",
"babel-preset-stage-1": "6.5.0",
"browser-sync": "2.11.1",
"chai": "3.4.1",
"cheerio": "0.19.0",
"colors": "1.1.2",
"cross-env": "1.0.7",
"css-loader": "0.23.1",
"eslint": "2.2.0",
"eslint-loader": "1.3.0",
"eslint-plugin-react": "4.0.0",
"extract-text-webpack-plugin": "1.0.1",
"file-loader": "0.8.5",
"mocha": "2.3.4",
"node-sass": "3.4.2",
"parallelshell": "2.0.0",
"react-transform-catch-errors": "1.0.1",
"react-transform-hmr": "1.0.1",
"redbox-react": "1.2.0",
"rimraf": "2.5.0",
"sass-loader": "3.1.2",
"style-loader": "0.13.0",
"watch": "0.17.1",
"webpack": "1.12.11",
"webpack-dev-middleware": "1.4.0",
"webpack-hot-middleware": "2.6.0",
"yargs": "3.32.0"
},
任何帮助表示感谢。
答案 0 :(得分:3)
看起来有些版本的电线以某种方式交叉。结束删除我的node_modules目录rm -r node_modules
并重新安装npm install
并修复它。