【问题标题】:can't build a project with expo (react native and node)无法使用 expo 构建项目(反应原生和节点)
【发布时间】:2019-03-13 13:16:29
【问题描述】:

当我尝试在控制台中运行“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

我尝试了所有方法,但这种情况仍在发生。谁能帮帮我。

【问题讨论】:

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


【解决方案1】:

以下行No git binary found in $PATH 告诉您您的Windows 机器上没有安装git

您需要安装git

  1. Windows installer下载最新的Git。

  2. 成功启动安装程序后,您应该会看到 Git 设置向导屏幕。按照下一步和完成提示完成安装。对于大多数用户来说,默认选项非常合理。

  3. 打开命令提示符(或 Git Bash,如果在安装期间您选择不从 Windows 命令提示符中使用 Git)。

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

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

这些说明来自Atlassian

【讨论】:

  • 试过了,可惜没用。仍然遇到同样的错误。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-01-23
  • 1970-01-01
  • 2022-10-23
  • 2018-05-29
  • 2020-05-28
  • 2020-07-09
相关资源
最近更新 更多