安装时的 npm 依赖问题......好吧,几乎任何东西 [英] npm dependency issue when installing... well, pretty much anything
本文介绍了安装时的 npm 依赖问题......好吧,几乎任何东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
突然,这发生了:
$ 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
,遇到此错误,并尝试升级历史记录.我不知道在这里做什么.
...when I try to install, well, pretty much anything. I've tried to install react-bootstrap
, got this error, and tried to upgrade history. I'm not sure what to do here.
我试过 npm i -S history@1.17.0
无济于事.同样的错误.
I've tried npm i -S history@1.17.0
to no avail. Same error.
这是我的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"
},
感谢任何帮助.
推荐答案
看起来有些版本的电线以某种方式交叉.最终删除了我的 node_modules 目录 rm -r node_modules
并重新安装了 npm install
并修复了它.
Looks like some versions had their wires crossed somehow. Ended up removing my node_modules directory rm -r node_modules
and reinstalling npm install
and that fixed it.
这篇关于安装时的 npm 依赖问题......好吧,几乎任何东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文