无法使用EXPO建立项目(React Native和Node)

时间:2019-03-13 13:16:29

标签: node.js git react-native npm expo

当我尝试在控制台中运行“ expo init my-new-project”时,出现以下错误:

npm ERR! code ENOGIT
npm ERR! Error while executing:
npm ERR! undefined ls-remote -h -t ssh://git@github.com/expo/react-native-maps.git
npm ERR!
npm ERR! undefined
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\??\AppData\Roaming\npm-cache\_logs\2019-03-13T13_11_19_931Z-debug.log
Process exited with non-zero code: 1

我尽了一切,但这种情况仍在发生。有人可以帮我吗。

1 个答案:

答案 0 :(得分:1)

以下行No git binary found in $PATH告诉您Windows计算机上尚未安装git

您需要安装git

  1. Windows installer下载最新的Git。

  2. 成功启动安装程序后,应该会看到Git安装向导屏幕。按照“下一步”和“完成”提示完成安装。对于大多数用户而言,默认选项非常明智。

  3. 打开命令提示符(如果在安装过程中选择不使用Windows命令提示符中的Git,则打开Git Bash)。

  4. 运行以下命令,使用以下命令配置您的Git用户名和电子邮件,用您自己的名字代替Emma的名字。这些详细信息将与您创建的所有提交相关联:

$ git config --global user.name "Emma Paris"
$ git config --global user.email "eparis@atlassian.com"

这些说明来自Atlassian