简体   繁体   English

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

[英]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

  1. Download the latest Git for Windows installer . 下载最新的Windows版 Git 安装程序

  2. 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. 对于大多数用户而言,默认选项非常明智。

  3. 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)。

  4. 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"

These instructions are from Atlassian 这些说明来自Atlassian

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

相关问题 当我运行“ expo init my-app”时,无法使用expo构建项目(React Native和Node) - When I run “expo init my-app” I can't build a project with expo (React Native and Node) React Native ios 构建:找不到节点 - React Native ios build : Can't find node 无法在Mac上构建和运行react-native项目 - Can't build and run react-native project on Mac 为什么我不能使用 expo init 命令创建 React native 项目? - Why can't I create a React native project using the expo init command? 反应原生'无法在项目中找到expo - React native 'unable to find expo in the project ios 模拟器未在 expo 反应原生项目中启动 - ios simulator not launching in expo react native project 无法在 expo-react-native 应用程序上运行“expo start”,权限问题 - Can't run 'expo start' on a expo-react-native app, permission problem 无法启动 expo 项目 - Can't start expo project 安装 node、react-native、npm 和 expo 做你的桌面有什么好处? [等候接听] - What are the benefits of installing node, react-native, npm and expo do your desktop when you can just code in expo snack? [on hold] React Native Expo 错误:设置项目时“'node'不被识别为内部或外部命令,可运行程序或批处理文件” - React Native Expo error: "'node' is not recognized as an internal or external command, operable program or batch file" while setting up the project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM