Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"exp: command not found" How do I add expo cli to path?

I installed the expo cli with

npm i -g exp

then I run

exp

and I get

-bash: exp: command not found

I'm guessing I didn't add exp to path. So how do I do this properly? Nothing I've tried so far works.

like image 331
Bobby Zhang Avatar asked Aug 09 '18 20:08

Bobby Zhang


People also ask

How to add Expo to path file?

Find the path where expo is globally installed by npm: npm bin -g 2. Add path from Step 1 to paths file: sudo vi /etc/paths 3. Restart the Terminal Share Improve this answer Follow edited Nov 24 '20 at 20:16 Rap 6,39022 gold badges4747 silver badges8181 bronze badges

How do I know what version of Expo I am running?

Run expo --version to determine what version you are currently working with. The commands listed below are derived from the latest version of Expo CLI. You can view the list of commands available with your version in your terminal using expo --help. To learn more about a specific command and its options use expo [command] --help.

How do I view the list of commands available with Expo?

You can view the list of commands available with your version in your terminal using expo --help. To learn more about a specific command and its options use expo [command] --help. Deprecated: Use app.config.js to switch config files instead. Specify which template to use.

How do I upgrade the Expo CLI?

So to start to upgrade the Expo CLI, type: Once you’ve pressed return you’ll see a bunch of messages show up and it will whirr away for a good few minutes while it updates everything. Mine took a good 5 minutes and half way through it seemed to sit and do nothing – just leave it alone for a while, it is updating!


1 Answers

try sudo npm install --global expo-cli this worked for me.

➜  MobileDev git:(campaigns-responsive) ✗ expo whoami
› Not logged in, run expo login to authenticate
➜  MobileDev git:(campaigns-responsive) ✗ expo init App
✔ Choose a template: › blank                 a minimal app as clean as an empty canvas
✔ Downloaded and extracted project files.
📦 Using npm to install packages.
✔ Installed JavaScript dependencies.

✅ Your project is ready!

To run your project, navigate to the directory and run one of the following npm commands.

- cd App
- npm start # you can open iOS, Android, or web from here, or run them directly with the commands below.
- npm run android
- npm run ios
- npm run web
like image 197
Sreyorn Len Avatar answered Sep 21 '22 06:09

Sreyorn Len