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

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

问题描述

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

I have installed expo-cli globally. But when I try to run command npm start it still asks to install expo-cli globally. Why?

我已经重新安装了 expo-cli 但同样的问题,即使在机器重启后也是如此.

I have reinstalled expo-cli again but same issue, even after machine restart.

这里是更多细节的截图:

Here is the screenshot for further details:

推荐答案

其实我重装了expo-cli,这是一个更新版本,和项目文件不匹配,因为项目已经初始化使用 expo init.

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.

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

I created another directory, reinitialized using expo init and now npm stat command works like a charm.

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

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