'expo' 未被识别为内部或外部命令 [英] 'expo' is not recognized as an internal or external command

查看:26
本文介绍了'expo' 未被识别为内部或外部命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行 npm install -g expo-cli 并成功全局安装包后,expo 仍然无法识别为内部或外部命令.有谁知道我如何使用 Windows 10 解决这个问题,或者如何使用路径变量之类的东西.

After running npm install -g expo-cli and successfully installing the packages globally, expo is still not recognized as an internal or external command. Does anyone know how I might get around this issue using windows 10, or what to do in terms of something like a path variable.

推荐答案

可能唯一缺少的就是将 expo 可执行文件添加到您的路径.

对于 Windows 10,您只需将 npm 文件夹添加到您的路径环境变量.

For Windows 10, you can simply add the npm folder to your path environment variable.

  1. 按 Windows 键并搜索 环境变量.
  2. System variables 下的 Path 变量中,添加一个新的具有此内容的条目(条目以分号分隔)(不带/node_modules):
  1. Hit Windows key and search for Environment variables.
  2. Inside the Path variable under System variables, add a new entry (entries are separated by semicolons) with this content (without /node_modules ):

%USERPROFILE%AppDataRoaming pm

%USERPROFILE%AppDataRoaming pm

或者如果您使用的是 yarn C:Users{USER}AppDataLocalYarnin(如上面提到的@Qwerty)

OR if you are using yarn C:Users{USER}AppDataLocalYarnin (as @Qwerty mentioned above)

  1. 打开一个新的命令提示符并输入

<代码>>世博会

您将看到如下内容:

这篇关于'expo' 未被识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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