Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I properly install expo-cli with yarn?

I'm trying to install expo-cli.

When I use npm install -g expo-cli, it installs with the below output.

Output of npm install -g expo-cli

When I try to run the expo command I get an error that the system cannot find the path specified. I then uninstalled with npm uninstall -g expo-cli

I uninstalled node and npm and cleaned up my system, then I tried installing expo-cli with yarn global add expo-cli. It installed with the following output.

Output of yarn global add expo-cli

After this, expo init command worked. But when I run expo start in a project folder I get the below output.

Output of expo-start

I don't know what else to do. I'm on Windows 10.

like image 515
chidimo Avatar asked Apr 01 '19 21:04

chidimo


People also ask

How do you add Expo to yarn?

To install Expo CLI, just run npm install -g expo-cli (or yarn global add expo-cli , whichever you prefer). Create a new app with expo init or use it in place of exp/XDE/CRNA in your existing app with expo start .


2 Answers

For Yarn:

If you want to save expo-cli package globally then try

yarn global add expo-cli

and if you want expo-cli to be available in the folder in which you are currently working then use

yarn add expo-cli

For npm:

npm install expo-cli --global

or

npm install expo-cli
like image 91
Ketan Ramteke Avatar answered Sep 20 '22 17:09

Ketan Ramteke


There's a similar issue reported here. You can try adding expo to your local project to see if that helps.

Try:

yarn add expo
like image 33
Romario Raffington Avatar answered Sep 17 '22 17:09

Romario Raffington