React native expo init issue

Viewed 668

I want to learn react native and now I'm stuck when I run command: expo init my-app.

I have installed node and expo in my computer but when I want to create a new react native app, receive an error:

expo : The term 'expo' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • expo
  •   + CategoryInfo          : ObjectNotFound: (expo:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

What should I do to fix that problem?

Thank you guys!

1 Answers

Run npm i -g expo-cli or npm install --global expo-cli in the terminal.

Install Expo globally first. This error occurred because expo was not installed globally.

Also, check whether you have npm folder added correctly to your path under Environment Variables

Related