Home > Enterprise >  How to Upgrade React Native Version 0.66.3 to 0.70.6?
How to Upgrade React Native Version 0.66.3 to 0.70.6?

Time:12-23

Currently, my project running on the 0.66.3 version I need to upgrade to react native version 0.70.6. So I have used to following command

npx react-native upgrade

After running this command showing some error I have attached a screenshot please refer.enter image description here

I am also trying the manual way using react native helper but some files are not available in my project. so anyone please tell me how I will upgrade my project version?

After Run npx react-native run-android my build was created successfully but 3 errors showing in the metro bundler. I have attached a screenshot of the metro bundler error. enter image description here

CodePudding user response:

you can specify a React Native version and pass it as an argument:

npx react-native upgrade 0.70.6

CodePudding user response:

Since upgrading an application can break functionality in your app if you do not know what is needed to be changed. the upgrade is tells you to visit the pages to go through and see what has changed throughout the upgrading process.

Other as that I am just needing more information regarding to what is not working. Since upgrading is more as just running a command, its about reading the documentation and see what part is missing and what they replaced the files with. The missing files could be straight-out deprecated and not working with the new version.

As always check the debugger and read every message throughout and visit all links given and see the documentation regarding the upgrade differences, find out if there are any log files you could look at, and talk with people in your company / group of react-native about this.

"Some files are not available in my project" This part might just be able to google and see if this is still supported or not in the version it could be phased out, or not supported in the version. that's where versioning comes in to play.

I am unsure what files and which libraries are deprecated based on your Opening Post, this needs more information, to help us, help you.

  • Related