Uninstalling Expo CLI

2020-06-01 01:39发布

问题:

I have installed Expo CLI globally and cant start a new react native app without using expo cli and therefore would like to uninstall it from my system. I have spent hours trying to work out how to removeit globally from my system

回答1:

I had the same problem and after searching I found this command:

npm -g uninstall expo-cli --save

finally expo-cli is deleted from my pc but it still asks about it every time I type create-react-native-app. if anybody knows how to go on from here be my guest.

and I hope this helps you

edit: if you use react-native init it is almost the same as create-react-native-app without expo-cli. This is how I chose to carry on as using the create command with expo-cli gives the application error after error if you install any api.



回答2:

if you are using npm then this command will work for uninstalling expo cli

npm -g uninstall expo-cli --save


回答3:

for completely uninstall expo cli

on Windows

  • the first step use this in cmd npm -g uninstall expo-cli --save
  • second go to <windwos drive>\Users\<yourUser>\ and then remove .expo folder

on Mac OS Catalina

  • the first step npm -g uninstall expo-cli --save && yarn global remove expo-cli

  • second cd ~ && rm -rf .epo

Thanks to @Александр Наумкин for editing



回答4:

npm -g uninstall expo-cli --save did not work for me, but yarn global remove expo-cli did.

I expected the npm option to work, and was surprised when it didn't. I am using nvm, and wonder if this answer explains why the npm option didn't work for me.



回答5:

If yarn don't work for you or you prefer using npm use:

npm rm -g expo cli


回答6:

I used this command to uninstall expo-cli from my machine:

npm -g uninstall expo-cli --save

And It worked for me, hope for you too!



回答7:

In Windows 10 npm uninstall -g expo-cli --save worked for me from nodejs console, opening it as administrator