我正在尝试将swagger-ui安装到现有项目中,并且收到以下错误消息:
Olivers-MacBook-Pro:incrementum oliverpike$ npm install --save-dev --save-exact swagger-ui@3.2.0
npm WARN deprecated create-react-class@15.5.2: create-react-class has known issues with Browserify before version 15.5.3. Please update create-react-class to 15.5.3 or a newer version.
npm WARN saveError Problems were encountered
npm WARN saveError Please correct and try again.
npm WARN saveError peer invalid: react@^0.14.8, required by react-addons-shallow-compare@0.14.8
npm WARN saveError peer invalid: react@^0.14.0, required by react-object-inspector@0.2.1
bitcoin-core-custom@1.0.1 /Volumes/github-image/bitcoin-core
├── UNMET PEER DEPENDENCY react@15.6.1
└─┬ swagger-ui@3.2.0
├─┬ brace@0.7.0
│ └── w3c-bl
(rest snipped...)
npm WARN react-addons-shallow-compare@0.14.8 requires a peer of react@^0.14.8 but none was installed.
npm WARN react-object-inspector@0.2.1 requires a peer of react@^0.14.0 but none was installed.
IOW,听起来像反应 - 插件 - 浅 - 比较和反应 - 对象 - 检查员不喜欢更新版本的反应(15.6.1)。我只有两个选项可以降级项目中的反应版本,或者将swagger_ui安装到可以拥有自己的依赖项的不同目录中吗?
答案 0 :(得分:0)
我最后选择了swagger-ui-dist(没有这个问题)而不是swagger-ui。