Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expo command is not found ubuntu

I have installed expo with this command - npm install expo-cli -g but when I am writing expo in command line, is writing that expo in not found.

I have tried to install with yarn and it was installed successful but is writing that expo in not found.

I have tried to export PATH to ~/.profile but this did not help me.

What do I need to do to make my expo project?

like image 301
Rapprogtrain Avatar asked Oct 26 '25 00:10

Rapprogtrain


2 Answers

If it is installed, expo might not be in your PATH.

  1. Check if npm global is in your path. $ echo $PATH,
  2. if not in your path add npm global to your path.

get the path of your global npm npm config get prefix

add the output of the above command to your .bashrc or .zshrc file.

# replace npm-global-path with the output of npm config get prefix
export PATH=npm-global-path/bin:$PATH

then

# source your .bashrc, .zshr or *.profile
source ~/.bashrc or source ~/.zshrc

Environment variables in bash_profile or bashrc?

like image 99
TenTen Peter Avatar answered Oct 28 '25 03:10

TenTen Peter


Problem Solved with following steps

  1. first of all install expo-cli using the below command line

    npm install expo-cli -g

2 after installation of expo-cli set global variable using below command line

export PATH=~/.npm-global/bin:$PATH 

Happy Coding!

like image 30
Adeel Ahmed Baloch Avatar answered Oct 28 '25 02:10

Adeel Ahmed Baloch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!