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
To completely uninstall expo cli
On Windows
The first step npm -g uninstall expo-cli --save (also yarn global remove expo-cli if you use yarn).
Second cd %USERPROFILE% && rmdir /Q /S .expo
On Mac OS Catalina
The first step npm -g uninstall expo-cli --save (also yarn global remove expo-cli if you use yarn).
Second cd ~ && rm -rf .expo
Thanks to #Александр Наумкин and #Liko for editing and comments
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.
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.
if you are using npm then this command will work for uninstalling expo cli
npm -g uninstall expo-cli --save
I had the same problem once, i have tried
npm -g uninstall expo-cli
but after the my problem didn't get solved, i have searched lot even after that problem did't get solved,
i am also using yarn so finally i have decided to remove using the yarn
i tried
yarn global remove expo-cli
This indeed solved my issue
If you are using nvm.
search for node version with expo installed.
find ~/.nvm -name "*expo*" -type d
nvm use {nodeversion}
npm -g uninstall expo-cli
If yarn don't work for you or you prefer using npm use:
npm rm -g expo cli
Very simple to uninstall a npm package.
Just enter this command :
npm uninstall -g expo-cli
In Windows 10 npm uninstall -g expo-cli --save worked for me from nodejs console, opening it as administrator
In windows 10 to uninstall :
npm uninstall -g expo-cli --save
yarn remove global expo-cli
Worked for me.
After that, for install last version then:
npm install -g expo-cli --save
expo-cli --version
3.21.13
I had this issue.
My steps
npm cache clean --force
npx install create-react-native-app
cd
npm install -g expo-cli
expo start
If you get error at 4 about node.js just install latest version. Then
Open your package.json file and add:
"react-navigation": "git://github.com/Snailapp/react-navigation.git#2.18.5"
npm install
Ok, in addition to existing answers, with commands like npm -g uninstall expo-cli and deleting manually .expo folder inside %USER% i try expo whoami, and my output was:
$ expo whoami
There is a new version of expo-cli available (4.13.0).
You are currently using expo-cli 3.23.3
Install expo-cli globally using the package manager of your choice;
for example: npm install -g expo-cli to get the latest version
[13:13:03] › Not logged in, run expo login to authenticate
So i had to do a bit more manual work:
%USER%\AppData\local and deleted expo folder
went to %USER%\AppData\Roaming\npm folder and manually deleted expo related files
After that i did expo whoami and output is:
$ expo whoami
bash: /c/Users/User/AppData/Roaming/npm/expo: No such file or directory
Finally, i opened new command prompt and did npm i --g expo-cli and after installation with expo -V i get 4.13.0.
I had the same issue
i unistalled using
npm uninstall expo-cli
or
npm unistall -g expo-cli
Here is how I install NPM on a Linux Mint 19.
sudo apt install nodejs
sudo apt install npm
The NPM version I get is 3.5.2, which is not the current version. To upgrade, I try the following commands.
sudo npm install latest-version
which has a few warning messages such as "not such file or directory, open '/home/me/package.json'"
and
sudo mpn install npm#latest -g
which runs without any warning or error messages.
The command
npm -v
still yields 3.5.2.
What is missing?
Also, the reason of using sudo in those upgrade commands is to work around some access permission.
try running:
which npm
and
sudo which npm
I suspect by running sudo apt-get ... you installed npm for your root user as opposed to your current user.
Try this command: npm install -g npm#latest or npm install -g npm#next
You can update NPM with: npm install -g npm.
See this Q&A for more variations that might occur/needed.
While executing this command on terminal(Mac OS) for setup react native environment
:~ npm install -g react-native-cli
getting error env: node: No such file or directory
It seems you don't have node installed on your system. Follow the instructions on this link
for MacOS
Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Node
brew install node
Install watchman
brew install watchman
Finally install React Native CLI
npm install -g react-native-cli
If you are using ubuntu try the command as
sudo npm install -g react-native-cli
and make sure node and nstrong textpm was installed in your system.
I am trying to install react-native-version-number. The instructions state that after installing, issue;
react-native link react-native-version-number
but when I do this, I get the following error message;
Looks like you installed react-native globally, maybe you meant react-native-cli?
To fix the issue, run:
npm uninstall -g react-native
npm install -g react-native-cli
but when I run
npm uninstall -g react-native
I get
npm WARN uninstall not installed in /usr/local/lib/node_modules: "react-native"
How do I link react-native-version-number?
As a workaround, dv3's comment about using rnpm link did work. However, I found that I was having this problem with other react-native commands, such as react-native run-android. This appears to be because npm was installed using homebrew. A description of this problem and how to fix it can be found at on this gist. In summary the required fix is to uninstall all your npm globably installed packages, uninstall node, then reinstall node, and reinstall npm without brew.
npm list -g --depth=0 # to list all your globally installed packages
rm -rf /usr/local/lib/node_modules
brew uninstall node
brew install node --without-npm
echo prefix=~/.npm-packages >> ~/.npmrc
curl -L https://www.npmjs.com/install.sh | sh
and then, you have to reinstall all your npm packages that were installed globally.
When I run sudo npm install -g typescript the only thing that gets installed is test3. This is what I get:
$ sudo npm install -g typescript
Password:
test3#1.0.0 /usr/local/lib/node_modules/test3
$ tsc
-bash: tsc: command not found
The Typescript compiler is never installed. I reinstalled node/npm just now to see if it was an install issue, but that didn't seem to fix it. Any ideas?