how to delete installed library form react native project
Solution 1:
- If it is a library based only on javascript, than you can just run
npm uninstall --save package_name
ornpm uninstall --save-dev package_name
- If you've installed a library with native content that requires linking, and you've linked it with rnpm then you can do:
rnpm unlink package_name
then follow step 1 - If you've installed a library with native content manually, then just undo all the steps you took to add the library in the first place. Then follow step 1.
note rnpm as is deprecated
Solution 2:
I followed the following steps:--
react-native unlink <lib name>
-- this command has done the unlinking of the library from both platforms.react-native uninstall <lib name>
-- this has uninstalled the library from the node modules and its dependenciesManually removed the library name from package.json
-- somehow the --save command was not working for me to remove the library declaration from package.json.
After this I have manually deleted the empty react-native library from the node_modules folder