安装了 Expo-cli,但在运行任何 expo 命令时,我得到“zsh: command not found: expo"; [英] Expo-cli installed but when running any expo command I get "zsh: command not found: expo"

查看:88
本文介绍了安装了 Expo-cli,但在运行任何 expo 命令时,我得到“zsh: command not found: expo";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在全球范围内安装了 expo-cli,但是当我尝试从任何地方运行诸如 expo start 之类的任何 expo 代码时,我得到:

I have installed expo-cli globally but when I try to run any expo code like expo start from anywhere, I get:

zsh:找不到命令:expo

echo $PATH 返回:

echo $PATH returns:

/Users/amitg/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/amitg/.npm-global/bin

我使用的是 macOS,catalina.

I am using macOS, catalina.

推荐答案

如今在 macOS 中运行 expo 的正确命令是 npx expo.

The correct command to run expo in macOS these days is npx expo.

例如

npx expo init my_app

如果没有安装expo-cli,它会为您提供安装说明

这篇关于安装了 Expo-cli,但在运行任何 expo 命令时,我得到“zsh: command not found: expo";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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