![](/img/trans.png)
[英]Git error, “unknown option '--short'” - “command failed with exit code 1”
[英]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.