expo : The term 'expo' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:1 char:1
expo init Weather
~~~~
+ CategoryInfo : ObjectNotFound: (expo:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我使用"npm install-expo-cli--global"在全局范围内安装了expo。但在这里,我无法使用expoint创建项目。我如何克服这一点?
可能唯一缺少的就是将expo可执行文件添加到您的路径中。
对于Windows 10,您可以简单地将npm文件夹添加到您的路径环境变量中。
- 点击Windows键并搜索环境变量
- 在System variables下的Path变量中,添加一个新条目(条目用分号分隔(,其中包含以下内容(不包含/nod_module(:
或者如果您使用的是纱线
C:Users{USER}AppDataLocalYarnbin
打开新的命令提示符并输入
expo
如果您正在使用yarn全局添加expo-cli,请尝试npm install -g expo-cli
。
如果你能得到一些输出,:(快乐,你很好去。