具体报错内容如下

error Command failed.
Exit code: 128
Command: git
Arguments: fetch --tags
Directory: /Users/abc/Library/Caches/Yarn/v6/.tmp/d1593e9d27bec6ffa28ff951a534b105
Output:
fatal: not a git repository (or any of the parent directories): .git
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

我这里的原因

  • 权限不足

解决方法

# Mac
sudo yarn add xxx

# Windows 
# 以管理员身份运行终端
Logo

一站式 AI 云服务平台

更多推荐