How do i downgrade expo and install a specific package?

vicky tr picture vicky tr · May 9, 2020 · Viewed 8.3k times · Source

Some of your project's dependencies are not compatible with currently installed expo package version: - @react-native-community/netinfo - expected version range: 5.5.1 - actual version installed: ^5.8.0 Your project may not work correctly until you install the correct versions of the packages. To install the correct versions of these packages, please run: expo install [package-name ...]

Im getting this above warning. is there any cli command to do install specific expo package? if yes then please provide it. Thanks.

Answer

monsty picture monsty · May 9, 2020

Into your package.json file, update the version of @react-native-community/netinfo to the right one (5.5.1), and make a npm install again.

You can also provide the version by using the cli command :

npm i @react-native-community/[email protected]