Expo CLI is installed globally but “npm start” command still asks

旧城冷巷雨未停 提交于 2019-12-01 23:43:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!