安装“react-bootstrap-table”后出现错误。
├── react@15.4.1
└── UNMET PEER DEPENDENCY react-router@3.0.0
我的package.json
"dependencies": {
"isomorphic-fetch": "^2.2.1",
"react": "^15.4.0",
"react-addons-linked-state-mixin": "^15.4.0",
"react-bootstrap": "^0.30.6",
"react-bootstrap-table": "^2.6.0",
"react-cookie": "^0.4.8",
"react-dom": "^15.4.0",
"react-redux": "^4.4.6",
"react-router": "^3.0.0",
"react-router-apply-middleware": "0.0.2",
"react-router-bootstrap": "^0.23.1",
"react-router-relative-links": "^0.1.0",
"redux": "^3.6.0",
"redux-logger": "^2.7.4",
"redux-promise-middleware": "^4.1.0",
"redux-thunk": "^2.1.0"
}
感谢任何帮助。
最佳答案
这篇博文很好地解释了同伴依赖性!
https://nodejs.org/en/blog/npm/peer-dependencies/
There's one use case where this falls down, however: plugins. A plugin package is meant to be used with another "host" package, even though it does not always directly use the host package. Most plugins never actually depend on their host package.
The solution to this was peer dependancy
在你的情况下,你似乎实际上不需要安装它,因为我挖掘了 react-bootstrap-table
包的存储库并发现 react-router@3.0.0
被提及为开发依赖项并在其示例应用程序中使用。
因此,除非他们将示例与包捆绑在一起(这是极不可能的),否则您可以忽略它。
关于reactjs - 未满足的对等依赖性react-router@3.0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41014576/