Warning: Invalid version react-native@0.64.2 for expo sdkVersion 43.0.0. Use react-native@0.64.3

Viewed 9819

I am working on an expo project and everything is working fine, but I began to get a warning message when android is building as

Warning: Invalid version react-native@0.64.2 for expo sdkVersion 43.0.0. Use react-native@0.64.3

The app is still running fine but I don't how to fix this error yet and I want to know if it won't cause an issue later.

5 Answers

I have tried to run npx react-native upgrade 0.64.3 but it didn't work, I got this error

info Fetching diff between v0.64.2 and v0.64.3... error Fetch request failed with status 404: 404: Not Found. error Failed to fetch diff for react-native@0.64.3. Maybe it's not released yet?

changing the version of react-native manually in the package.json and run expo install worked for me

I use the expo doctor command it allows diagnose issues with the project.

I would recommend using the expo upgrade command. It upgrades the project packages and config for the given SDK version.

More to find here.

I just faced the same issue. Basically it's telling you should use a higher version of your react-native. I solved it just by updating it to the specified version.

npx react-native upgrade 0.64.3

More info here. Cheers,

If as in my case one need a specific version of react-native, let's say older because some legacy dependencies in a particular project that for some reason can't be upgrade, then change the version in the package.json won't work.

What worked as the cli suggested is to use:

expo doctor --fix-dependencies

That installed the correct lower version of react-native

To find out actual problems run this command :

expo doctor

To solve all problems regarding package conflicts run this command:

expo doctor --fix-dependencies

Use sudo on Unix based OS if you have permission issue to run those commands.

Related