I tried to update my version of Expo CLI and it broke Expo CLI and now I have no CLI.

expo diagnostics log that’s printed out: This does not apply because Expo has been uninstalled in my update process.

On the quest to update to Expo 36, I ventured forth. I was on Expo CLI 3.4.1. Then I ran npm install -g expo-cli. The install failed, I think. I tried running npm start after this and it said

'expo' is not recognized as an internal or external command,
operable program or batch file.

I tried to install Expo CLI again after this. Let’s see what happens. It did not work. Same error.

npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

Help. I can’t even test now.

this is a common problem that people encounter with npm. see: Resolving EACCES permissions errors when installing packages globally | npm Docs or How to fix permissions on globally installing npm packages on linux - danillo lima

Thanks but its an EPERM, not EACCESS error. I’ll try restarting my machine as per another post I found on StackOverflow. I D K.

Edit: Restarting my machine WORKED.

Further question - can someone explain these steps?

  • Update the Expo app on your phones from the App Store / Google Play. expo-cli will automatically update your apps in simulators if you delete the existing apps, or you can run expo client:install:ios and expo client:install:android .

Up until now I have been running my app in the Expo Play Store app on my phone. Can I continue to do this? There’s no Play Store app update that I see available to me. DO I have to do the rest of this? The install:android etc stuff? I’ve never done that. What is that for?

  • If you built a standalone app previously, remember that you will need to create a new build in order to update the SDK version. Run expo build:ios and/or expo build:android when you are ready to do a new build for submission to stores.

I think my app is not standalone. How can I confirm?

you can continue to use it on your phone. if you don’t see an update then it may have automatically updated in the background. that comment is just about how to update the client in the ios or android emulators, if you’re using them (eg: https://docs.expo.io/versions/v36.0.0/workflow/android-studio-emulator/)

a standalone app is defined here: https://docs.expo.io/versions/v36.0.0/workflow/glossary-of-terms/#standalone-app

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