Rapprogtrain
Rapprogtrain

Reputation: 155

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?

Upvotes: 4

Views: 6908

Answers (3)

Renjith P N
Renjith P N

Reputation: 4231

Try npx expo init AwesomeProject, this worked for me.

Upvotes: 1

Adeel Ahmed Baloch
Adeel Ahmed Baloch

Reputation: 800

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!

Upvotes: 1

Junius L
Junius L

Reputation: 16122

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?

Upvotes: 9

Related Questions