【问题标题】:git clone error when running command 'gatsby new gatsby-site' - Command failed with exit code 1 (EPERM):运行命令“gatsby new gatsby-site”时出现 git clone 错误 - 命令失败,退出代码为 1(EPERM):
【发布时间】:2020-02-06 13:54:19
【问题描述】:

我正在尝试开始一个新的 gatsby 项目。运行命令“gatsby new [我的项目名称]”时出现错误。

Tomers-MBP:个人项目 tomermatmon$ gatsby new haifa-dev info 从 git 创建新站点:https://github.com/gatsbyjs/gatsby-starter-default.git xcrun:错误:无效的活动开发者路径 (/Library/Developer/CommandLineTools),缺少 xcrun:/Library/Developer/CommandLineTools/usr/bin/xcrun

错误

命令失败,退出代码为 1 (EPERM):git clone https://github.com/gatsbyjs/gatsby-starter-default.githaifa-dev --single-branch

错误:命令失败,退出代码 1 (EPERM):git clone https://github.com/gatsbyjs/gatsby -starter-default.git haifa-dev --single-branch

  • error.js:58 makeError [lib]/[gatsby-cli]/[execa]/lib/error.js:58:11

  • index.js:112 句柄承诺 [lib]/[gatsby-cli]/[execa]/index.js:112:26

  • next_tick.js:68 process._tickCallback 内部/进程/next_tick.js:68:7

【问题讨论】:

    标签: git github terminal gatsby


    【解决方案1】:

    听起来您的 Mac 上没有安装 xcode cli 工具。有时它也会在软件更新后发生。

    尝试运行xcode-select --install

    【讨论】:

    • 您好,感谢您的帮助。你能解释一下 Xcode 与此有什么关系吗?
    • 您发布的错误消息提到缺少对命令行工具的引用。在 MacOS 上,使用包括 node 在内的许多 CLI 工具通常需要安装命令行工具。您可以通过 xcode 本身执行此操作,也可以运行上述命令。
    【解决方案2】:

    就我而言,命令行工具已经安装。所以我不得不在软件更新后使用以下命令重置路径

    sudo xcode-select --reset
    

    我正在使用 macOS Big Sur。版本 - 11.1

    【讨论】:

      猜你喜欢
      • 2018-07-12
      • 2015-10-12
      • 2019-06-21
      • 2018-10-15
      • 1970-01-01
      • 2022-01-11
      • 1970-01-01
      • 2019-12-04
      • 1970-01-01
      相关资源
      最近更新 更多