繁体   English   中英

运行命令“gatsby new gatsby-site”时出现 git 克隆错误 - 命令失败,退出代码为 1 (EPERM):

[英]git clone error when running command 'gatsby new gatsby-site' - Command failed with exit code 1 (EPERM):

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

Tomers-MBP:personal-projects tomermatmon$ gatsby new haifa-dev info Creating new site from git: https://github.com/gatsbyjs/gatsby-starter-default.git xcrun: error: invalid active developer path (/Library/ Developer/CommandLineTools),在以下位置缺少 xcrun:/Library/Developer/CommandLineTools/usr/bin/xcrun

错误

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

错误:命令失败,退出代码 1 (EPERM):git 克隆https://github.com/gatsbyjs/gatsby -starter-default.ZBA9F11ECC3497D9993B933FDCs BD61E5Z

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

  • index.js:112 handlePromise [lib]/[gatsby-cli]/[execa]/index.js:112:26

  • next_tick.js:68 process._tickCallback internal/process/next_tick.js:68:7

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

尝试运行xcode-select --install

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

sudo xcode-select --reset

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

暂无
暂无

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

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