React Native version check

Mayank Raj picture Mayank Raj · Jul 7, 2018 · Viewed 7.9k times · Source

I wanted to check the version of the react native I was using in my project when I used the command from my root folder :

D:\Reactnative\Albums>npm view react-native version
0.56.0

The version was 0.56.0 which is not the version I have installed, but on:

D:\Reactnative\Albums>react-native -v
react-native-cli: 2.0.1
react-native: 0.55.4

The version mentioned here is 0.55.4, which is correct. So why this conflict?

Answer

Aung Myat Hein picture Aung Myat Hein · Jul 7, 2018

npm view react-native version

You can check the latest version of react native. You can run it under the root of your project or everywhere. Of course, you will need internet connection to check latest version.

react-native -v

If you run under the root of project, it will return the version of two npm packages, react-native-cli and react-native. Those versions are using in your project.