Expo cli update not happening
Solution 1
For mac users (linux should be very similar):
Find your expo-cli version:
which expo-cli
For me it yielded:
/Users/username/.config/yarn/global/node_modules/.bin/expo-cli
Remove this outdated version:
rm -rf /Users/username/.config/yarn/global/node_modules/.bin/expo-cli
Check that you are using the latest version:
expo-cli --version
Solution 2
Updating expo-cli globally can be a right pain. To those experiencing this frustration, use yarn
yarn global add expo-cli
it will give you far fewer headaches
Solution 3
On MacOS (Linux should be very similar):
Find the location of the expo-cli version:
which expo-cli
You would probably get:
/usr/local/bin/expo-cli
Remove this outdated version by using:
rm -rf /usr/local/bin/expo-cli
Then install the latest version:
npm install -g expo-cli
After that, check that you are using the latest version:
expo-cli --version
Solution 4
If you are using a Mac, these 2 commands will do the tricks 1)which expo to locate expo in your Mac which will give you this "/usr/local/bin/expo" 2) "cd /usr/local/bin/" 3)-rm expo 4)-rm expo-cli
Related videos on Youtube
oflcad
A react native developer, from Tunisia with love, i once made a game for windows phone :D
Updated on September 15, 2022Comments
-
oflcad over 1 year
I am trying to upgrade expo-cli from 2.11 to 2.18 but
npm i -g expo-cli@latest
still points to the old version.when I typed
expo-cli -V
it resulted:2.11 ...so naturally npm i -g expo-cli@latest will grab the latest version and install it but still expo-cli -v is still pointing to the old version.
I remember installing packages in bash level is a no go operation.
these are some images to put it all into context:
Update: Removed Nodes modules as suggested in the first answer, and that lead to npm removal both expo and expo-cli are not found with the command
where
-
Stritt almost 4 yearsyarn global add expo-cli
-
Design by Adrian over 3 yearsThis above tip works because you're removing both expo and expo-cli. No need to
cd
into the directories, though.rm -rf /usr/local/bin/expo
,rm -rf /usr/local/bin/expo-cli
-
Design by Adrian over 3 yearsThis works because you let old versions of expo litter in your NPM directories and just installed into Yarn instead, ending up with more junk on your computer.
-
Ryan Trainor about 3 yearsI just spent 30 minutes battling expo-cli with npm, and then felt nothing but joy as it was seamlessly installed in yarn
-
sandrina-p almost 3 yearsSame, couldn't fix it with nom, even following the "which expo-cli" suggestion. yarn solved it