繁体   English   中英

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

[英]can't build a project with expo (react native and node)

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

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

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

您需要安装git

  1. 下载最新的Windows版 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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM