I'm new to expo-cli and keep running into this on the terminal
expo init myproject
-bash: expo: command not found
First, I tried uninstall and installing via
sudo npm uninstall -g expo-cli && sudo npm i -g expo-cli
+ expo-cli@2.6.14
Second, I checked nodejs to see what version it was running on:
node -v
v10.15.0
npm -v
6.4.1
Third, I tried to see if it was an environment issue and adding a path via:
sudo vim ~/.bash_profile
inserting the following to the end:
# NPM global installs
export PATH=$PATH:~/.npm-global/bin
Did not solve the issue.
First off, I am not going to take credit, This issue is was solved a long time ago and it is quite easy to solve, although not permanently yet.
So it is said that it is an issue with the environment, where as the device you're using need to know where the programmes are.
-Check if /users/me/.npm-global/bin
by running: echo $PATH
-It is isn't run export PATH=$PATH:~/.npm-global/bin
-After that you should be good to get back to the shell
source ~/.bash_profilez
Like I said am not taking credit for this. Here is where i found our life saver;
at firs do this:
npm install expo-cli
then it installed run this command:
npm install expo-cli --global
it worked for me , and i hope it works for you too ;)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.