I have a dependency in my package.json that points to a git repo and branch (eg git+ssh://git@github.com/some-repo#some-branch-name
). When I install dependencies, yarn resolves the commit-ish to a specific commit hash in yarn.lock, which causes my deployments to eventually pull old versions of my code. Is there any way to get yarn to always pull the most recent commit from the specified git branch?
Asked
Active
Viewed 2,179 times
4

tk421
- 5,775
- 6
- 23
- 34

Jeremy Vessella
- 41
- 2
-
1The whole point of yarn.lock is to lock in a specific commit. Why do you automatically want it to resolve to a new version? (You *could* though I do not recommend it: drop `yarn.lock` or use `yarn add some-repo` – k0pernikus Dec 10 '19 at 11:35
-
1I run into the same problem. With regular npm packages it's possible to resolve to a more recent version, e.g. by using a caret or tilde. This ensures that a new `yarn install` resolves the latest version. With a git link this doesn't seem possible – Stephan Muller Feb 22 '20 at 02:54
-
so the solution is to drop ```yarn.lock``` file and do ```yarn install``` again. I could not find any other method. Please share if any – Yusuf Oct 05 '20 at 14:02