Friday 27 September 2019

Simplest way to remove and uninstall react-native module or package

Hi guys, I recently ran into an issue while working with react-native. I installed a package for storage but the package didn't work as I had expected and it was causing significant error in the mobile app. I had to install a different package.
So, i went ahead to remove the previous package by doing normal npm uninstall --save
The above code only had effect in my package.json file, and caused the app to start showing white blank screen.
After several hours battling with the app and codes, I discovered that decided to try using react-native command rather than npm.
Show I did react-native uninstall which worked and everything began to work in the app again. The effect of this code is that it not only uninstall the packages the right way, it also unlinks them if they are linked.

Thank you for read, happy coding.


Follow me on twitter: http://www.twitter.com/_josiah_king Join me on Google+: https://www.plus.google.com/u/0/113541005774136102412/posts/p/pub?cfem=1