Why am I told to install versioned Expo CLI when it's already installed?

When I run

expo-cli doctor

I get

WARNING: The legacy expo-cli does not support Node +17. Migrate to the versioned Expo CLI (npx expo).

But when I run

yarn expo doctor

I get

expo doctor is not supported in the local CLI, please use expo-cli doctor instead

This seems circular, or at least fishy. I have the latest expo and expo-cli installed, but I’m still being told to install something else (more recent).

How do I fix this so I’m not being told to install something that (I think) I already have installed.


$ npm list --location=global --depth=0
β”œβ”€β”€ @aws-amplify/cli@10.7.3
β”œβ”€β”€ corepack@0.16.0
β”œβ”€β”€ create-expo-app@1.3.2
β”œβ”€β”€ eas-cli@3.6.0
β”œβ”€β”€ expo-cli@6.3.1
β”œβ”€β”€ firebase-tools@11.23.1
β”œβ”€β”€ ios-sim@9.0.0
β”œβ”€β”€ npm-check-updates@16.7.5
β”œβ”€β”€ npm@9.5.0
└── react-devtools@4.27.2
$ which -a eas
$ eas --version
eas-cli/3.6.0 darwin-arm64 node-v18.14.1
$ expo --version
WARNING: The legacy expo-cli does not support Node +17. Migrate to the versioned Expo CLI (npx expo).

In my project directory:

$ yarn list
β”œβ”€β”€ expo-dev-client@2.0.1
β”œβ”€β”€ expo-file-system@15.1.1
β”œβ”€β”€ expo-sharing@11.0.1
β”œβ”€β”€ expo-splash-screen@0.17.5
β”œβ”€β”€ expo-status-bar@1.4.4
β”œβ”€β”€ expo-updates@0.15.6
β”œβ”€β”€ expo@47.0.13
$ which -a expo
$ /private/var/folders/90/46v8ldy13r13wf1hr7w9xzfw0000gn/T/xfs-08dd5804/expo
-bash: /private/var/folders/90/46v8ldy13r13wf1hr7w9xzfw0000gn/T/xfs-08dd5804/expo: No such file or directory

At ~:

$ npm list
└── (empty)
$ yarn list
yarn list v1.22.19
Done in 0.01s.
$ which -a expo

Hi @orome

The warnings could be better, but basically it’s saying that if you are running expo-cli you should do it with node 16. The suggestion to switch to npx expo is mostly correct. Just not for doctor.

The versioned/local Expo CLI does indeed not support the doctor command. Instead it has npx expo install --fix, which is similar, although I’m not sure it’s as thorough.

So I suggest downgrading to node 16 if you want to run expo-cli doctor.

1 Like

So my expo and eas are fine, it’s just (a warning) about my node version?


Yeah so that is a pretty bad error message.

Might be worth creating an issue on GitHub for the misleading warning

1 Like

For context: Shouldn’t 18 work? It’s LTS and the docs are quite clear that LTS should be work.

Maybe another thing to bring up in the issue.

Note: I don’t have any inside information about this, but I suspect expo-cli is basically on its way to being deprecated, so maybe they haven’t done the necessary testing to be sure it works with Node 17/18, since most people are using the local/versioned CLI for most things now.

The SDK 48 Beta release notes don’t even tell you to run expo-cli upgrade anymore:

  • Upgrade an existing project:
    Install the beta version of the Expo package:
    npm install expo@next or yarn add expo@next
    Upgrade all dependencies to match SDK 48:
    npx expo install --fix
1 Like

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