问题
I try to execute command npm start
on terminal on my Mac.
It prompts me to install Expo CLI , I say Y, wait until installation to finish, then I end up in an endless loop where it keeps prompting me to install Expo CLI again:
This command requires Expo CLI.
Do you want to install it globally [Y/n]? y
Installing the package 'expo-cli'...
Expo CLI installed. You can run `expo --help` for instructions.
This command requires Expo CLI.
Do you want to install it globally [Y/n]?
Any ideas why I'm having this?
回答1:
Turns out my profile file was messed up (I had previously installed Anaconda which seems to have changed .bash_profile
entries)
I removed all those stuff and inserted the correct $PATH that bash should look into. That was it.
回答2:
I have faced similar issue. I have a few solutions. Try if they work out for you.
- In case you have added the path multiple times remove it.
- Ensure that there are no blank spaces or blank lines after the Path.(This one worked for me)
来源:https://stackoverflow.com/questions/59593996/endless-loop-on-installing-expo-cli