运行npm install时有关对等依赖项的警告

时间:2018-04-08 20:25:49

标签: reactjs firebase npm warnings

我尝试使用

更新我的React / Firebase项目
npm install --save firebase-functions@latest

我收到了很多警告:

npm WARN google-maps-react@2.0.0 requires a peer of react@~0.14.8 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN google-maps-react@2.0.0 requires a peer of react-dom@~0.14.8 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN firebase-functions@1.0.1 requires a peer of firebase-admin@~5.12.0 but none is installed. You must install peer dependencies yourself.

我是新手,所以不确定我应该运行哪个命令来修复警告。

1 个答案:

答案 0 :(得分:10)

手动安装:

npm install --save react@^16.0.0
npm install --save react-dom@^16.0.0
npm install --save firebase-admin@~5.12.0
npm install --save firebase-functions@latest