问题
I have installed expo-cli globally. But when I try to run command npm start it still asks to install expo-cli globally. Why?
I have reinstalled expo-cli again but same issue, even after machine restart.
Here is the screenshot for further details:
回答1:
The same happened to me, I just started using expo start instead of npm start and is working now.
回答2:
Actually as I reinstalled expo-cli which was an updated version and was not matching with the project files, as the project was initialized using expo init.
I created another directory, reinitialized using expo init and now npm stat command works like a charm.
来源:https://stackoverflow.com/questions/52534354/expo-cli-is-installed-globally-but-npm-start-command-still-asks