skip to Main Content

I’m trying to create react native expo project, but when I’m creating it shows some warnings including this one: WARNING: The legacy expo-cli does not support Node +17. Migrate to the versioned Expo CLI (npx expo).
I’m using NodeJs 18 on my system and creating app using the command npx create-expo-app my-app it should work fine I guess, but still it’s showing me error…I don’t wanna downgrade my NodeJs version to 16 which I know is the solution for this, is there anything I can do to fix this?
enter image description here

2

Answers


  1. I don’t think expo-cli has support for node version higher than node 16. As you mentioned you don’t want to downgrade your node version, any specific reason for that?
    Moreover, you can use nvm to have multiple node versions installed on your system and you can specify the version of node you want to use for a project.

    Installing NVM and using it:

    1. You can get the latest nvm depending on your system from here.
    1. Once you have successfully installed NVM, install the node version you want: nvm install vX.Y.Z -> Specify the version you want to install in place of X.Y.Z

    2. Now, to use the installed version use- nvm use vA.B.C.

    Login or Signup to reply.
  2. you do not need to use the global expo-cli package at all anymore, it is deprecated. use npx expo within the project to invoke the cli from the local expo package within the project. eg: npx expo start. not all commands live on this new local cli package, for example you can use npx expo-doctor to use the npm package expo-doctor instead of expo doctor. see this blog post for more information: https://blog.expo.dev/the-new-expo-cli-f4250d8e3421

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search