expo: "expo upgrade is not supported in the local CLI" is confusing
Summary
Currently, npx expo upgrade gives the following message.
$ expo upgrade is not supported in the local CLI, please use expo-cli upgrade instead
But then the global expo-cli says its deprecated, and to use npx expo instead.
This cost me some time and confusion. The error message would benefit from clarification.
- is
expo upgradedeprecated in general, and we should just usenpm i expo@latestinstead? - or is the old global CLI deprecated mostly, but still the recommended way to do expo version upgrade?
What platform(s) does this occur on?
No response
SDK Version
No response
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.3.1
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 20.0.0 - ~/.nvm/versions/node/v20.0.0/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 9.6.4 - ~/.nvm/versions/node/v20.0.0/bin/npm
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
npmPackages:
expo: ~48.0.15 => 48.0.19
react: 18.2.0 => 18.2.0
react-native: 0.71.8 => 0.71.8
npmGlobalPackages:
eas-cli: 3.13.2
Expo Workflow: managed
Minimal reproducible example
npx expo upgrade
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 17
- Comments: 17 (1 by maintainers)
Commits related to this issue
- Fix `npx expo upgrade` migration instructions Fixes https://github.com/expo/expo/issues/22747 — committed to dcposch/expo by dcposch a year ago
- Switch expo upgrade to pnpm update Ref: https://github.com/expo/expo/issues/22747 Ref: https://blog.expo.dev/expo-sdk-48-ccb8302e231#b801 — committed to upleveled/hotline-bling-codealong by karlhorky 5 months ago
Running
npx expo upgradeshould give the correct instructions instead of instructing users to install the deprecated global cli.This works for me
npx expo-cli upgradeIn what way does it work / what do you see when you run that command? I see the following:
The error message from the cli is a time waster.
The linked PR for this discussion looks to suggest that
npm install expo@latest && npx expo install --fixwould fix this.(I have not tried it myself though)
Even more confusing… It appears to work, then says it’s not supported
in my case when I tried to upgrade expo SDK from 48 to 49 it worked
The steps for upgrading have changed and are detailed here