无法将"expo"识别为内部或外部命令 [英] 'expo' is not recognized as an internal or external command

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

问题描述

在运行npm install -g expo-cli并成功地全局安装软件包之后,仍然无法将expo识别为内部或外部命令.有谁知道我如何使用Windows 10来解决此问题,或者如何处理诸如path变量之类的问题.

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.

推荐答案

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

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

  1. 按Windows键并搜索Environment variables.
  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 with this content (without /node_modules ):

%USERPROFILE%\AppData\Roaming\npm

  1. 打开新的命令提示符,然后输入

> expo

您将看到以下内容:

You will see something like this:

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

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