我想学习 react native,现在我在运行命令时卡住了:expo init my-app。
我已经在我的计算机上安装了 node 和 expo,但是当我想创建一个新的 React Native 应用程序时,收到一个错误:
expo :术语“expo”不被识别为 cmdlet、函数、脚本文件或可运行程序的名称。查看 名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。 在行:1 字符:1
+ CategoryInfo : ObjectNotFound: (expo:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我应该怎么做才能解决这个问题?
谢谢你们!
答案 0 :(得分:1)
在终端中运行 // A list of paths to directories that Jest should use to search for files in
roots: [
"./",
"../more-files/"
],
或 npm i -g expo-cli
。
首先在全球安装 Expo。出现此错误是因为 npm install --global expo-cli
未全局安装。
另外,检查您是否已将 expo
文件夹正确添加到 npm
下的路径