Warnings about peer dependencies when running npm install - reactjs

I'm trying to update my React/Firebase project with
npm install --save firebase-functions#latest
and I get a lot of warnings:
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.
I'm a newbie so not sure which command should I run to fix the warnings.

Install it by hand:
With npm 5.0.0 or above (edited):
npm install react#^16.0.0
npm install react-dom#^16.0.0
npm install firebase-admin#~5.12.0
npm install firebase-functions#latest
Before npm 5.0.0 (original):
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

Related

React-webcam not getting added to my react project

I did the following to install react-webcam,
sudo npm install -g --save react-webcam
npm WARN react-webcam#3.0.1 requires a peer of react#>=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-webcam#3.0.1 requires a peer of react-dom#>=15.3.0 but none is installed. You must install peer dependencies yourself.
+ react-webcam#3.0.1
added 1 package from 1 contributor in 0.351s
but it wasnt added to the dependencies in package.json, So how can I add it to the node modules?

Webpack install throws an error UNMET PEER DEPENDENCY webpack#4.6.0 invalid

I am trying to compile an old project. npm install -D webpack earlier complained of webpack-cli install issue. Now if I try with the latest one npm i -D webpack#4.6.0, it is giving following error.
└── UNMET PEER DEPENDENCY webpack#4.6.0 invalid
npm WARN babel-loader#6.4.1 requires a peer of webpack#1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none was installed.
npm WARN webpack-dev-middleware#1.12.2 requires a peer of webpack#^1.0.0 || ^2.0.0 || ^3.0.0 but none was installed.
npm WARN webpack-dev-server#1.16.5 requires a peer of webpack#>=1.3.0 <3 but none was installed.
npm WARN react-tutorials#0.0.0 No repository field.
npm ERR! code 1

React-bootstrap not installing

I'm having issue installing react and react-bootstrap. I used them in the past and everything was working fine. But now, I seem to have an issue installing or updating them.
After the code line: npm install --save react-bootstrap in my terminal, I get these errors:
npm WARN react-bootstrap#0.32.1 requires a peer of react#^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-bootstrap#0.32.1 requires a peer of react-dom#^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-prop-types#0.4.0 requires a peer of react#>=0.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group#2.2.1 requires a peer of react#>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group#2.2.1 requires a peer of react-dom#>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-overlays#0.8.3 requires a peer of react#^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-overlays#0.8.3 requires a peer of react-dom#^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN prop-types-extra#1.0.1 requires a peer of react#>=0.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN uncontrollable#4.1.0 requires a peer of react#>=0.11.0 but none is installed. You must install peer dependencies yourself.
Even my past react projects aren't working anymore and I can't find in the docs anything about these errors.
Thank you for any help.
I suspect there's an typo in your command line
npm install --save react-booTstrap

[react-native]npm install warn require multiple version react

I'm running a react-native project,and it's package.json dependencies some third-part libraries,but maybe these libraries haven't update for a long time,they require different version of react.
When I npm install, I got warning below:
npm WARN react-native#0.43.3 requires a peer of react#16.0.0-alpha.6 but none was installed.
npm WARN native-base-shoutem-theme#0.1.0 requires a peer of react#>=15.1.0 but none was installed.
npm WARN #shoutem/animation#0.8.10 requires a peer of react#^15.0.0 but none was installed.
npm WARN react-static-container#1.0.1 requires a peer of react#^0.13.0 || ^0.14.0 || ^15.0.0 but none was installed.
npm WARN react-test-renderer#15.4.2 requires a peer of react#^15.4.2 but none was installed.
I'm not sure npm could install multiple version in a single project.So how could I fix this problem?

Error Installing React

Whenever I do a npm init then npm install react - I get this error
── UNMET PEER DEPENDENCY react#15.3.0
npm WARN baobab-react#0.1.1 requires a peer of react#>=0.13.0 <1.0.0 but none was installed.
npm WARN fixed-data-table#0.4.7 requires a
peer of react#>=0.13.0 <0.15.0 || ^0.14.0-beta3 but none was
installed.
npm WARN react-native#0.30.0 requires a peer of
react#~15.2.0 but none was installed.
npm WARN react-router#0.13.5
requires a peer of react#0.13.x||0.14.x but none was installed. npm
ERR! code 1
This is my node v6.3.0 annd npm 3.10.3 versions.
npm install react --no-optional
Inside your project directory, can you please first run the following commands:-
1) rm -rf node_modules
2) Try installig react again now and other packages which are in your package.json file.

Resources