Reputation: 489
I'm learning React Native. RN has upgrade documentation. But there are only 2 lines of code. After you type it, the project completely crashed. Build failed. All Google results returned old issues and they almost can not help. I tried 2 times but got brick in the head both. Luckily I had pushed everything into Github before I upgraded.
I'm using 0.25, and want to up 0.26. I can stay in 25 for now, but what if in future, when I really need to upgrade for, maybe, security patch, what is a safe way (step) I should follow in order not crash the project?
Thank you.
Update:
I'm trying to clone the project and update (over and over) and choose something difference in the work through the prompts options, let's see which option is right.
Upvotes: 3
Views: 634
Reputation: 47551
react-native-git-upgrade
Thanks to the ingenuity and hard work of @ncuillery, we now have a much better way to manage React Native upgrades that leverage git's mature merging system.
Read the official React Native blog post here: http://facebook.github.io/react-native/blog/2016/12/05/easier-upgrades.html
And the recently revised upgrading docs here: http://facebook.github.io/react-native/releases/next/docs/upgrading.html
Thanks Nicolas!
Upvotes: 4
Reputation: 489
I found out:
npm install --save react
is not enough, because I got a warn, it needs 15.0.2
So npm install --save [email protected]
solved my problem (after followed 3 steps in red warning screen.)
If you still get build failed, with Undefined symbols for architecture x86_64:
"std::terminate()", referenced from:
error, you need to add -lc++
in Other Linker Flags
in your xcode project build settings.
Check out this issue for more information https://github.com/facebook/react-native/issues/7566
Upvotes: 0