Wrong react native version
-
I'm submitting a ... [X ] bug report
-
Summary After creating the app and starting on expo goapp android: Warning: Invalid version [email protected] for expo sdkVersion 43.0.0. Use [email protected]
I had the same issue yesterday !
you need to update the package.json with right version and run "expo install" to apply the changes.
@blixit Thanks for suggesting the fix; can you submit a PR or show your changes so I can deploy a fix here? 🙏
I can do that this weekend
After investigation, the bad version comes from the execution of npx create-react-native-app ${name} -t with-typescript in the createBaseProject() function from src/buidler/index.ts.
The template with-typescript is defined here https://github.com/expo/examples/tree/master/with-typescript. You can see that it contains the version 0.64.2.
16 days ago, a pull request has been merged to upgrade the package to make it compatible with Expo SDK 43: https://github.com/expo/examples/pull/339 but the react-native version changed from this moment. Expo has already made the change here 11 days ago.
We have 2 ways to fix our issue:
- fixing the version of react-native in the builder by setting
'dependencies.react-native': '^0.64.3'but i'm not a fan of this solution which makes this package more dependant to expo. - submit a PR to Expo examples and wait: this is what I'm going to do.
I submitted the PR: https://github.com/expo/examples/pull/342
@francesco-clementi-92 @cawfree my PR has been merged. There is no need to update the current package.