简体   繁体   中英

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. When running the command 'gatsby new [my project name]' i get an error.

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

ERROR

Command failed with exit code 1 (EPERM): git clone https://github.com/gatsbyjs/gatsby-starter-default.git haifa-dev --single-branch

Error: Command failed with exit code 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 handlePromise [lib]/[gatsby-cli]/[execa]/index.js:112:26

  • 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. Sometimes it happens after a software update too.

Try running 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. Version - 11.1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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