最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

react native - Expo CLI does not support Node.js 17+ (Legacy expo-cli) - Stack Overflow

programmeradmin3浏览0评论

I am trying to check my Expo CLI version using the command:expo --version But I get this warning:

WARNING: The legacy expo-cli does not support Node +17. 
Migrate to the new local Expo CLI: /the-new-expo-cli-f4250d8e3421.

I am using Node.js 18.2 and previously installed expo-cli globally.

I tried running: npm uninstall -g expo-cli npm install -g expo But I still get the same error.

How can I fix this issue and properly use the new Expo CLI?

What did you try and what were you expecting? I tried uninstalling the old expo-cli and installing the new version of Expo CLI using the following commands:

npm uninstall -g expo-cli
npm install -g expo

I expected that by doing this, the warning related to Node.js 17+ would be resolved and I would be able to use the new Expo CLI without issues. However, after performing these steps, I am still encountering the same warning about the legacy expo-cli.

I am trying to check my Expo CLI version using the command:expo --version But I get this warning:

WARNING: The legacy expo-cli does not support Node +17. 
Migrate to the new local Expo CLI: https://blog.expo.dev/the-new-expo-cli-f4250d8e3421.

I am using Node.js 18.2 and previously installed expo-cli globally.

I tried running: npm uninstall -g expo-cli npm install -g expo But I still get the same error.

How can I fix this issue and properly use the new Expo CLI?

What did you try and what were you expecting? I tried uninstalling the old expo-cli and installing the new version of Expo CLI using the following commands:

npm uninstall -g expo-cli
npm install -g expo

I expected that by doing this, the warning related to Node.js 17+ would be resolved and I would be able to use the new Expo CLI without issues. However, after performing these steps, I am still encountering the same warning about the legacy expo-cli.

Share Improve this question asked Mar 18 at 16:40 Abdou JaganaAbdou Jagana 111 bronze badge 2
  • 1 expo-cli is deprecated. Did you check the link the error provides? blog.expo.dev/the-new-expo-cli-f4250d8e3421 It doesn't mention npm install -g expo – Estus Flask Commented Mar 18 at 16:43
  • You need to use npx expo not installing it locally or globally. – Slbox Commented Mar 21 at 0:04
Add a comment  | 

1 Answer 1

Reset to default 0

Expo-cli has been deprecated for a long time by now, and to receive the new Expo CLI, just simply run npm install expo, yarn add expo (if using Yarn), and Expo CLI is preinstalled in there. You can refer to this for more info Expo Docs on Expo CLI. I also recommend updating node.js to a version like 21.5 or newer, as it can really increase performance. I hope you will enjoy the new Expo Cli. Also, if you have already installed the new Expo Cli, do NOT use any commands starting with expo, as the is referring to the legacy cli and will pop up that error. Later, it would redirect to npx expo start, but the error is still there. To get rid of the error, start your expo commands like npx expo {command}, and the error should be gone.

发布评论

评论列表(0)

  1. 暂无评论