“未安装对等依赖项”警告,但已安装

时间:2018-11-24 15:20:52

标签: node.js reactjs npm react-redux

npm install上,我收到以下“未安装对等依赖项”警告:

npm WARN react-select@0.9.1 requires a peer of react@^0.14.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-select@0.9.1 requires a peer of react-dom@^0.14.1 but none is installed. You must install peer dependencies yourself.
npm WARN draft-js-markdown-shortcuts-plugin@0.3.0 requires a peer of react@^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN draft-js-markdown-shortcuts-plugin@0.3.0 requires a peer of react-dom@^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN draft-js-plugins-editor@2.0.8 requires a peer of react@^15.5.0 || ^16.0.0-rc but none is installed. You must install peer dependencies yourself.
npm WARN draft-js-plugins-editor@2.0.8 requires a peer of react-dom@^15.5.0 || ^16.0.0-rc but none is installed. You must install peer dependencies yourself.
npm WARN enzyme-adapter-react-16@1.7.0 requires a peer of react@^16.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN enzyme-adapter-react-16@1.7.0 requires a peer of react-dom@^16.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN filestack-react@1.3.9 requires a peer of filestack-js@^0.11.2 but none is installed. You must install peer dependencies yourself.
npm WARN filestack-react@1.3.9 requires a peer of react@^15.5.4 but none is installed. You must install peer dependencies yourself.
npm WARN react-avatar@2.5.1 requires a peer of react@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-helmet@5.2.0 requires a peer of react@>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-hot-loader@4.3.12 requires a peer of react@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-image-filter@0.1.2 requires a peer of react@>=15.6.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-image-filter@0.1.2 requires a peer of react-dom@>=15.6.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-json-tree@0.11.0 requires a peer of react@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-json-tree@0.11.0 requires a peer of react-dom@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-onclickoutside@6.7.1 requires a peer of react@^15.5.x || ^16.x but none is installed. You must install peer dependencies yourself.
npm WARN react-onclickoutside@6.7.1 requires a peer of react-dom@^15.5.x || ^16.x but none is installed. You must install peer dependencies yourself.
npm WARN hoist-non-react-statics@3.1.0 requires a peer of react@>=14.x but none is installed. You must install peer dependencies yourself.
npm WARN react-router@4.3.1 requires a peer of react@>=15 but none is installed. You must install peer dependencies yourself.
npm WARN react-router-dom@4.3.1 requires a peer of react@>=15 but none is installed. You must install peer dependencies yourself.
npm WARN react-svg@4.1.8 requires a peer of react@^15.5.4 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-svg@4.1.8 requires a peer of react-dom@^15.5.4 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-test-renderer@16.6.3 requires a peer of react@^16.6.3 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group@2.5.0 requires a peer of react@>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group@2.5.0 requires a peer of react-dom@>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN redux-devtools-log-monitor@1.4.0 requires a peer of react@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN redux-form@4.2.2 requires a peer of react-redux@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN slick-carousel@1.8.1 requires a peer of jquery@>=1.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN jade-react-loader@1.0.2 requires a peer of react@0 but none is installed. You must install peer dependencies yourself.
npm WARN react-jade@2.5.0 requires a peer of react@>=0.12.0 <0.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-select@0.9.1 requires a peer of react@^0.14.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-select@0.9.1 requires a peer of react-dom@^0.14.1 but none is installed. You must install peer dependencies yourself.
npm WARN formsy-react@0.19.5 requires a peer of react@^0.14.0 || ^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-css-super-themr@2.2.0 requires a peer of react@^0.14.0 || ^15.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN react-input-autosize@0.6.13 requires a peer of react@^0.14 || ^15.0.0-rc || ^15.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-select@0.9.1 requires a peer of react@^0.14.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-select@0.9.1 requires a peer of react-dom@^0.14.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-switch-button@1.1.2 requires a peer of react@^0.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN redux-form@4.2.2 requires a peer of react-redux@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN jade-react-loader@1.0.2 requires a peer of react@0 but none is installed. You must install peer dependencies yourself.
npm WARN react-jade@2.5.0 requires a peer of react@>=0.12.0 <0.15.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-select@0.9.1 requires a peer of react@^0.14.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-select@0.9.1 requires a peer of react-dom@^0.14.1 but none is installed. You must install peer dependencies yourself.
npm WARN react2angular@4.0.4 requires a peer of @types/prop-types@>=15 but none is installed. You must install peer dependencies yourself.
npm WARN react2angular@4.0.4 requires a peer of @types/react@>=16 but none is installed. You must install peer dependencies yourself.
npm WARN react2angular@4.0.4 requires a peer of @types/react-dom@>=16 but none is installed. You must install peer dependencies yourself.

我试图通过运行npm install @types/react-dom@>=16来删除这些警告,但是并没有删除这些警告。

如何摆脱这些警告?

2 个答案:

答案 0 :(得分:0)

您不能使用npm 3或更高版本自动安装对等方:请参见How to install npm peer dependencies automatically?

项目npm-install-peers(https://github.com/spatie/npm-install-peers#readme)将检测并安装对等项。

答案 1 :(得分:0)

您应该:

$ npm install --save-dev ...

注意:“ ...”是您要安装的软件包