Best way to upgrade an expo project to latest tools

expo diagnostics

  Expo CLI 4.12.1 environment info:
      OS: Windows 10 10.0.21390
      Node: 14.16.1 - C:\Program Files\nodejs\node.EXE
      npm: 6.14.12 - C:\Program Files\nodejs\npm.CMD
      Android Studio: Version AI-202.7660.26.42.7351085
      expo: ~41.0.1 => 42.0.4
      react: 16.13.1 => 16.13.1
      react-dom: 16.13.1 => 16.13.1
      react-native: => 0.63.2
      react-native-web: ~0.13.12 => 0.13.18
    Expo Workflow: managed

Hello people, so I just got back on a project I worked on for a few months at the beginning of the year and I had to put aside for a moment to help someone complete another one. I would like to get back to it in the best possible way, so I thought first I will upgrade all my packages. Of course expo first - expo upgrade is a no brainer. But then I got a lot of other packages. React navigation for example that got to its v5 while I have v5 installed, and such.

So I looked for a good way to handle upgrading all those packages, found ncu, looks cool but Iā€™m not sure how it would handle compatibility (even more so in an expo project).

Maybe I should simply create a new fresh expo project, copy over my src code and whatever I wrote, and expo install any needed dependency again? But I thought there should be a simpler way.

Thanks ahead :slight_smile:

Hi @jerrybels

After running expo upgrade you can use npm outdated or yarn outdated to see what updates are available, but of course you should be careful not to upgrade react, react-native, react-dom, react-native-web or any official expo-* packages.

For anything else you might want to look at their release notes to see if there might be breaking changes between the version you have installed and the latest version. And maybe upgrade one library at a time to make sure the app still works after the upgrade before moving on to the next one.

I do also find it useful to create a new Expo project and compare all the config files etc. between the real app and the new one just to see what else might need to be changed.

1 Like

I agree, sounds reasonable. Thanks.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.