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?
Question posted in React native
The official React Native documentation can be found here.
The official React Native documentation can be found here.
2
Answers
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:
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.ZNow, to use the installed version use-
nvm use vA.B.C
.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 localexpo
package within the project. eg:npx expo start
. not all commands live on this new local cli package, for example you can usenpx expo-doctor
to use the npm packageexpo-doctor
instead ofexpo doctor
. see this blog post for more information: https://blog.expo.dev/the-new-expo-cli-f4250d8e3421