I am trying to uninstall the "react-native-cli" which I use for react-native projects! but I am not able to do so!
My environment is mac
.
Here is what i have done so far!
Whether I type npm uninstall -g react-native-cli
or sudo npm uninstall -g react-native-cli
.
The terminal shows: up to date in 0.041s
When I type react-native init projectName
, it still creates the project.
I think the command react-native init
should not to work.
Anyone knows how to uninstall react-native-cli
?
Thanks in advance.
SOLUTION ONE ! not fully sure this will work! but try updating your npm first by doing
npm install npm
and after that try uninstalling the cli if that does not work then
SOLUTION TWO !
Here is another go around to solve the issue its a bit manual way
1: First run this
npm list -g
this will show the list of installed packages in your user folder
then check . using command+f if there is react-native-cil there
then do this
open /usr/local/lib/node_modules
This will open the root installed packages and you can manually find and delete the react-native-cli like this
If you are using yarn
. You can do yarn global list
then check that if any package contains react-native
. Then run yarn global remove <package>
to remove that package.
ex:
yarn global remove @react-native-community/cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With