I can not install the latest version of expo cli 2.19.5 on my computer

I have updated my project to sdk 33, everything is fine except that I can not install modules like LinearGradient and more because I have version 2.6.14, I have tried all npm install -g react-native-cli, yarn, but when I enter expo -V command always appears 2.6.14 and will not let me use the expo install command …
node 10.16.0
npm 6.9.0
yarn 1.16.0
Help please, I’ve tried everything and I do not know what to do!

Hi @jorgem! You should be using expo-cli, instead.

Try npm install -g expo-cli

Thanks for your reply @charliecruzan … Yes, I know I have to update expo cli, but the problem is that I do not get it, I tried with npm install -g expo-cli, yarn global add expo-cli @ latest and with several more commands, I have deleted the cli and I have reinstalled, I spent a day searching the web, expo forum and stackoverflow but I can not find the way to update the expo cli to the latest version.

Hm…that’s super weird!

Have you tried uninstalling, and running expo -v to see if it still thinks it’s installed? Might be worth clearing the npm cache? Can’t say I’ve seen this before

1 Like

Most likely you installed expo-cli using yarn or you have multiple installations of npm. You can check where old cli is installed with command -v expo and remove it or override your PATH variable in a way that forces to use bin directory from your current npm.

2 Likes

Thank you for your answer @wkozyra, it may be that the path you indicate is the one that must be followed. command -v expo throws /usr/bin/expo, do you say to delete that file with rm -r /usr/bin/expo and reinstall?
I am very confused, I do not control the environment very well, I get along better with logic and design.
expo diagnostics
Expo CLI 2.6.14 environment info:
System:
OS: Linux 4.15 Ubuntu 16.04.6 LTS (Xenial Xerus)
Shell: 4.3.48 - /bin/bash
Binaries:
Node: 10.16.0 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.5.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
npmPackages:
expo: ^32.0.0 => 32.0.6
react: 16.5.0 => 16.5.0
react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1
react-navigation: ^3.7.1 => 3.7.1
npmGlobalPackages:
expo-cli: 2.20.0

I already found the solution was installing global npm in an incorrect directory. Thank you very much for your help, it has been of great value to me.

This issue raised due to conflict between npm and yarn. Better remove expo from yarn by command yarn global remove expo-cli then use ‘npm i -g expo-cli’ you will get updated version.

Thanks

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.