Expo CLI已全局安装,但"npm start"已安装命令仍然询问 [英] Expo CLI is installed globally but "npm start" command still asks

查看:175
本文介绍了Expo CLI已全局安装,但"npm start"已安装命令仍然询问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经全局安装了expo-cli.但是,当我尝试运行命令npm start时,它仍然要求全局安装expo-cli.为什么?

即使机器重新启动后,我仍重新安装了expo-cli,但存在相同的问题.

以下是屏幕截图,以获取更多详细信息:

解决方案

实际上,当我重新安装expo-cli时,这是一个更新版本,并且与项目文件不匹配,因为该项目是使用expo init初始化的.

我创建了另一个目录,使用expo init重新初始化,现在npm stat命令就像一个超级按钮一样.

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:

解决方案

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.

这篇关于Expo CLI已全局安装,但"npm start"已安装命令仍然询问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆