'expo' command not found

i have installed node v10.19.0 and run

npm install expo-cli --global

but when try to run expo commands like

expo init projectname

it's showing error like below in my ubuntu.

Command 'expo' not found, did you mean: command 'exo' from snap exoscale-cli (v1.19.0) command 'expn' from deb sendmail-base (8.15.2-18) command 'expr' from deb coreutils (8.30-3ubuntu2)
See 'snap info <snapname>' for additional versions.

1 Answer

I had the same issue, I found out that expo-cli is installed already under this path /home/$USER/.npm-global/bin so all need to be done is to add it to the default path:

export PATH="$PATH:/home/$USER/.npm-global/bin"

permanently add it to path:gedit gedit ~/.profile

Then add this line at the end:

export PATH="$PATH:/home/$USER/.npm-global/bin"

to get the path effected just run this command in every terminal that you wanna use: source ~/.profile or just log out and login again.

This worked for me.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like