Proper mechanism to downgrade react-native
For existing projects if you want to install/downgrade to lower version
npm install react-native@x.x.x ex: npm install react-native@0.43.4
This will install the version specified.
Check the installed version with react-native --version
Update 2020
Just run
npm install react-native@0.43.8
Replace 0.43.8
with version you need.
Please update your react
dependency in package.json to explicitly be 15.0.2
, not ^15.0.2
since the latter resolves to 15.1.0
which causes this issue. It is recommended to leave it that way until you upgrade for the next time and get this error once again (to avoid react
changing its version in the meantime and react-native
not being ready for it).
Also, with npm3 EPEERINVALID
is no longer an error, but warning.