React Native Expo error: "'node' is not recognized as an internal or external command, operable program or batch file" while setting up the project

Viewed 180

While setting up the environment for an authentication app using React native and expo

These are the code I have ran:

expo init firebaseauth
npm install @react-navigation/native
expo install react-native-screens react-native-safe-area-context
npm install @react-navigation/native-stack

But while running expo install firebase in VS code terminal its is returning:

'node' is not recognized as an internal or external command,
operable program or batch file.

Action taken after that:

  1. Installed the latest version of Node and NPM.
  2. Set up the environment variable to C:\Program Files\nodejs
  3. Restarted my system

Still its returning the same error in VS code terminal while running expo install firebase

'node' is not recognized as an internal or external command,
operable program or batch file.
1 Answers

After restarting the system, Node was recognized by my vs code terminal.

After that Yarn was throwing the same error.

I had to update Node, npm, yarn, and expo from Windows PowerShell as admin. Otherwise, none of it works if you don't update all of them from as admin.

Related