【问题标题】:Update package installed from git in Yarn 3Yarn 3 中从 git 安装的更新包
【发布时间】: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


【解决方案1】:

由于它是交互式的,因此并不理想,但您可以运行 yarn up -i @foo/utils 并选择“重用”以强制软件包再次从同一 git 源解析(并重新安装)。

【讨论】:

    猜你喜欢
    • 2019-07-31
    • 1970-01-01
    • 2020-07-01
    • 2017-09-10
    • 2023-02-01
    • 1970-01-01
    • 2011-12-18
    • 2017-06-11
    • 2021-12-29
    相关资源
    最近更新 更多