具体报错内容如下

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

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐