#39;expo#39; is not recognized as an internal or external command(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.
- 按 Windows 键并搜索
环境变量. - 在
System variables下的 Path 变量中,添加一个新的具有此内容的条目(条目以分号分隔)(不带/node_modules):
- Hit Windows key and search for
Environment variables. - 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)
- 打开一个新的命令提示符并输入
<代码>>世博会
您将看到如下内容:
这篇关于'expo' 未被识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:'expo' 未被识别为内部或外部命令
基础教程推荐
- 如何从 logcat 中删除旧数据? 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
