I’ve been working on a tutorial using expo and when I run
expo start, I get this message in the command line.
There is a new version of expo-cli available (3.19.2). │
│ You are currently using expo-cli 3.18.6 │
│ Install expo-cli globally using the package manager of your choice; │
│ for example:
npm install -g expo-cli to get the latest version
When I run
sudo npm install -g expo-cli these are the errors I get:
npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path …/lib/node_modules/expo-cli/bin/expo.js
npm ERR! dest /usr/local/bin/expo
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink ‘…/lib/node_modules/expo-cli/bin/expo.js’ → ‘/usr/local/bin/expo’
npm ERR! File exists: /usr/local/bin/expo
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/hal9000/.npm/_logs/2020-04-26T23_51_06_879Z-debug.log
When I check the version it is the same:
How can I work around this to install the latest CLI?
npm uninstall -g expo-cli then run
npm i -g expo-cli again. hard to say what could have led you to get into this state
npm uninstall -g expo-cli
did not work
My guess is that it is because npm is clashing with yarn. I’ve never used yarn before but the expo cli asks for you to install it in the installation process so I did. I understand that yarn is a package manager similar to npm.
I had an issue with npm not showing up in the Terminal at all. So I had to reinstall Node from their website and after I reinstalled it npm was showing up again and everything was fine.
For the moment, expo is working fine with the previous version so I can continue using it, but I was trying to update it because I was trying to install:
expo install react-native-svg
but it’s not letting me install.
Also, another expo team member mentioned in another thread that the PATH to yarn needs to be removed?
I’m not sure how to remove the PATH but here was his answer:
Most likely you have installed expo-cli using yarn and npm. You are updating with npm but version form yarn is first in
PATH . Just remove it from yarn.
It’s possible that it’s note yarn but two different node/npm installed in your system.
From this thread: Trying to uninstall expo-cli - no success
i think the recommendation there is because you want to avoid having expo-cli installed globally with both npm and yarn.
when you say that
npm uninstall -g expo-cli “did not work” - what do you mean? what error do you see? if you installed expo-cli globally with yarn then run
yarn global remove expo-cli and then install it with npm
I don’t believe I installed expo with yarn. I installed yarn while installing the expo cli because it prompted me to.
I just mentioned that because of the conflict I had last week with my npm installation not showing up in the command line. I’m pretty sure it has something to do with the yarn installation because I’ve never had that happen before.
When I run
npm uninstall -g expo-cli nothing happens. It just says
up to date in 0.027s
did you try
yarn global remove expo-cli?
Yes! That looks like it worked.
I was able to reinstall with
npm i -g expo-cli
Also, I was able to
expo install react-native-svg successfully.
And it looks like the expo version was updated as well
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.