【问题标题】:Npm not installingnpm 没有安装
【发布时间】:2019-06-03 20:34:44
【问题描述】:

我是新来的原生反应。我正在开发天气应用程序。我正在尝试运行该应用程序。但是 npm 没有安装。我收到这个错误。 npm 错误!代码ENOGIT npm 错误!执行时出错: npm 错误!未定义 ls-remote -h -t https://github.com/react-community/react-navigation.git npm 错误! npm 错误!不明确的 npm 错误!在 $PATH 中找不到 git 二进制文件 npm 错误! npm 错误!使用 git 失败。 npm 错误!请检查您是否安装了 git 并在您的 PATH 中。

代码的url是https://github.com/nazmulidris/react-native-weather

如有任何帮助,将不胜感激

【问题讨论】:

  • 您可以发布错误的屏幕截图吗?
  • 请看上图我添加了错误截图
  • 使用这个' npm install npm@latest -g
  • 我遇到同样的错误
  • 你的 npm 看起来不错,尝试安装 git , npm install -g git-install

标签: reactjs react-native npm npm-install


【解决方案1】:

您的系统上似乎没有安装git 客户端。请参阅安装说明here。我认为这样做之后,npm 的问题将得到解决。

【讨论】:

  • 我也安装了 git
  • 你能看看这个项目是否在你的系统上运行
  • 是的,我会试着告诉你结果。
  • npm install 命令完成且没有错误。我在 Ubuntu 上使用 npm 版本 6.4.1 和 git 2.17.1。您能否运行git --version 命令并报告您得到的结果?
  • 您发布的屏幕截图中的错误消息显然是:No git binary found in the PATH. Please check if you have git installed and in your PATH。错误消息是你的朋友。