【发布时间】:2022-07-21 10:28:40
【问题描述】:
如何使用 Yarn 3 更新从 Git 存储库安装的专有依赖项?
package.json 条目:
"@foo/utils": "git+https://gitlab+deploy-token-...:...@gitlab.com/foo/bar.git#ISSUE-6652-some-git-branch",
yarn up @foo/utils 导致以下错误:
➤ YN0027: @foo/utils@git+https://gitlab+deploy-token-...:...@gitlab.com/foo/bar.git#ISSUE-6652-some-git-branch can't be resolved to a satisfying range
Internal Error: The remote server failed to provide the requested resource
我需要将包更新为该分支中的最新提交,而我目前知道的唯一方法是从 yarn.lock 手动删除该包的条目,但我想这不是应该做的事情。
【问题讨论】:
-
同样的问题,我只能通过输入整个 URL 来升级包,例如
yarn up xxx@git+ssh://xxxxxxx#branch
标签: yarnpkg-v3