如何使用 yarn 安装 ant-design/icons-vue ?

作者站长头像
站长
· 阅读数 23

如何是用 yarn 安装 ant-design/icons-vue

https://3x.antdv.com/components/icon-cn 这里是用一个是用 npm 的方式 npm install --save @ant-design/icons-vue

但是如果我想是用 yarn 安装呢?

─➤  yarn add ant-design/icons-vue           
yarn add v1.22.21
[1/4] 🔍  Resolving packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads ssh://git@github.com/ant-design/icons-vue.git
Directory: /Users/ponponon/Desktop/code/work/pon-it/tracking-king
Output:
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

上面这样做会报错,是什么原因呢?依赖问题吗?还是是用 yarn 姿势不对?还是网络问题呢?

回复
1个回答
avatar
test
2024-06-20

原来是要加 @

╰─➤  yarn add @ant-design/icons-vue                                                                                                                                                                                                                128 ↵
yarn add v1.22.21
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > less-loader@11.1.3" has unmet peer dependency "webpack@^5.0.0".
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ @ant-design/icons-vue@7.0.1
info All dependencies
└─ @ant-design/icons-vue@7.0.1
✨  Done in 4.94s.
回复
likes
适合作为回答的
  • 经过验证的有效解决办法
  • 自己的经验指引,对解决问题有帮助
  • 遵循 Markdown 语法排版,代码语义正确
不该作为回答的
  • 询问内容细节或回复楼层
  • 与题目无关的内容
  • “赞”“顶”“同问”“看手册”“解决了没”等毫无意义的内容