加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

reactjs – UNMET PEER DEPENDENCY react-router@3.0.0

发布时间:2020-12-15 20:19:30 所属栏目:百科 来源:网络整理
导读:安装“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
安装“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"
  }

谢谢你的帮助.

解决方法

这篇博文很好地解释了Peer Dependancies!
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软件包的repo,并发现react-router@3.0.0被提及为dev依赖项并在其示例应用程序中使用.

因此,除非他们将示例与包非常不可能捆绑在一起,否则您可以忽略它.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读