简体   繁体   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):

I am trying to start a new gatsby project.我正在尝试开始一个新的 gatsby 项目。 When running the command 'gatsby new [my project name]' i get an error.运行命令“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), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun 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

ERROR错误

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

Error: Command failed with exit code 1 (EPERM): git clone https://github.com/gatsbyjs/gatsby -starter-default.git haifa-dev --single-branch错误:命令失败,退出代码 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 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 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 next_tick.js:68 process._tickCallback internal/process/next_tick.js:68:7

Sounds like you don't have the xcode cli tools installed on your mac.听起来您的 Mac 上没有安装 xcode cli 工具。 Sometimes it happens after a software update too.有时它也会在软件更新后发生。

Try running xcode-select --install尝试运行xcode-select --install

For my case, the command line tools were already installed.就我而言,已经安装了命令行工具。 So I had to reset the path after the software update using the following command所以我不得不在软件更新后使用以下命令重置路径

sudo xcode-select --reset

I am using macOS Big Sur.我正在使用 macOS Big Sur。 Version - 11.1版本 - 11.1

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

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