2

How to update a proprietary dependency installed from Git repo with Yarn 3?

package.json entry:

"@foo/utils": "git+https://gitlab+deploy-token-...:...@gitlab.com/foo/bar.git#ISSUE-6652-some-git-branch",

yarn up @foo/utils results in the following error:

➤ 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

I need to update the package to latest commit in that branch and the only way I currently know is removing entry for this package manually from yarn.lock, but I guess that's not how things should be done.

amik
  • 5,613
  • 3
  • 37
  • 62
  • 1
    same issue, I can only upgrade the package by typing the whole URLs, like `yarn up xxx@git+ssh://xxxxxxx#branch` – LeoDT Mar 04 '22 at 02:06

1 Answers1

1

It's not ideal since it's interactive, but you can run yarn up -i @foo/utils and choose "reuse" to force the package to resolve (and reinstall) from the same git source again.

davidmyersdev
  • 1,042
  • 8
  • 10