[英]can't build a project with expo (react native and node)
When I try to run "expo init my-new-project" in my console i get these errors : 当我尝试在控制台中运行“ 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
I tried everything but this is still happening. 我尝试了一切,但这种情况仍在发生。 Can someone please help me.
有人可以帮帮我吗。
The following line No git binary found in $PATH
is telling you that you do not have git
installed on your Windows machine. 以下行在
No git binary found in $PATH
告诉您Windows计算机上未安装git
。
You need to install git
. 您需要安装
git
。
Download the latest Git for Windows installer . 下载最新的Windows版 Git 安装程序 。
When you've successfully started the installer, you should see the Git Setup wizard screen. 成功启动安装程序后,应该会看到Git安装向导屏幕。 Follow the Next and Finish prompts to complete the installation.
按照“下一步”和“完成”提示完成安装。 The default options are pretty sensible for most users.
对于大多数用户而言,默认选项非常明智。
Open a Command Prompt (or Git Bash if during installation you elected not to use Git from the Windows Command Prompt). 打开命令提示符(如果在安装过程中选择不使用Windows命令提示符中的Git,则打开Git Bash)。
Run the following commands to configure your Git username and email using the following commands, replacing Emma's name with your own. 运行以下命令以使用以下命令配置您的Git用户名和电子邮件,将Emma的名称替换为您自己的名称。 These details will be associated with any commits that you create:
这些详细信息将与您创建的所有提交相关联:
$ git config --global user.name "Emma Paris"
$ git config --global user.email "eparis@atlassian.com"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.