-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrading packages from git repos not working #1573
Comments
Had a similar issue, where upgrade changed the node.js v6.9.1 |
Same issue. debian jessie64 |
Could someone please provide a |
@wyze this is a bit hard to reproduce as you need to add a I can summarize the reproduction steps for you:
I hope this helps 😁 PS: it might have to do with the fact that repos from |
I'll try those steps, thanks. That is enough information for me to try and reproduce the issue. |
The same for me:
|
I have the similar error:
|
Seeing the same issues, but cleaning cache does resolve this for us. Unfortunately any time saved with yarn is lost due to this bug and we do not trust it for production use. |
fwiw, just like with npm, I typically bump the version on git hosted packages when I change them to work around this. If it's a fork, I just add It's great that this is being treated like a bug on yarn, hopefully it is fixed so that it works similar to bundler. |
|
Should be fixed now #2074. |
This is still not working for me in v0.19.1, but it is hard to tell if #2074 is in that build. For me;
|
waiting for this :( |
I opened a pull request which mirrors |
This should be fixed. Please double check. |
Still not working in v0.21.3, I need this for my workflow. Without this, I can not get the benefits of using yarn. |
Please update to the latest version. |
I didn't realize that the RC was available, Installed RC v0.22.0 and it's working now! 😄 |
weird, it seems works for some people, but still does not work for me. After pushing to git repo master
|
How do I install a RC? I'd like to move to v0.22.0 but I can't figure out how to install RC versions. |
@heyitsjames I've managed to install on OSX by instruction on this page :
After I've spent some time cleaning yarn build istalled by homebrew, make sure to clean it before install. |
Here I too describe the issue with upgrading from git repo. |
#3198 -- related |
Just reproduced the issue on latest Yarn. Still does not work. Git repository was updated with new commit, yarn does not upgrade it saying it's up to date, resolving previous commit 👎 |
Yarn 0.27.5
|
broken for me with v1.0.2 |
@bestander I think there is a regression or something. I also needed to do |
@krzkaczor this is a year old bug and was reported to be fixed, please open a new issue with repro steps |
@bestander Also seeing this bug, I think it is a regression because it used to work fine until recently. It happens in my case when the git dependency is to a particular branch. Probably related: #4722 |
I have the same problem when pointing the package to my forked repo. i have pushed a new commit and yarn again. nothing was upgraded and even removed the node_modules and then yarn again still failed. |
Same here. Did someone opened a new issue for this? I do not believe many people will find it here. |
I am still experiencing this. It will not update to the new commit I pushed to my forked repo. |
@apengstrom it is better to make repo and instructions to reproduce, or no one will believe you here =) |
Instructions are already given, scroll up. I was just commenting that the issue still exists. |
@apengstrom I am unable to reproduce the problem on v1.3.2. I also use private repos daily at work and have not had a problem, so I can't dive in and try to debug it. Here is a quick example:
Note that the dependency's Now I'll update that dependency:
and back to the original project, run an
The dependency has been updated. Keep in mind we are pretty much all volunteers working on this open source project. If this is a reproducible and blocking issue for you, we encourage you to help out debugging the issue and opening a PR to fix it. |
@rally25rs I can reproduce this every time. I have several projects, but let's assume If I run: It will properly upgrade If however, I run Edit: It may be relevant that |
@andreialecu does If you are willing to provide more detail, like what the package.json entries are and what branches/tags exist on the projects that it should resolve to, and the before and after yarn.lock entries, then it might help debug. |
@rally25rs Actually, something else happens now that I looked into it. It doesn't downgrade Here's yarn.lock: On the left is the current version of that particular package, with the current dependencies. This is after running just On the right is what running Notice how it is deciding to just revert the dependency changes that occured during the last 4 commits, even though the main package itself resolves to the same exact commit hash. I was seeing problems because of one of the subdependencies of that package reverting every time and reintroducing a bug.
I can reproduce it every time by doing |
@andreialecu since this issue is already marked "closed" for almost a year, would you mind opening a new issue and copy/pasting your details above into it? You can try to assign me to it, or just mention me if you can't assign me. Thanks! |
this issue just bit us as well. yarn 0.27.5 on ubuntu we were using the url of we have to update the version # in the branch for |
Happening to me too. Though, I'm not on latest yarn, but definitely 1+. Could a sworn I had committed some regression tests... Will try to take a look later today. |
A lot of bugs have been fixed since v0.27.5, and |
Please reopen this issue, as it exists in 1.3.2! Steps to repro:
|
@Hobart2967 |
I'm still facing a similar problem with private reps but I've found a workaround, Using Using |
We were still observing something like this in 2022, yarn version 1.22.19, and we think we narrowed it down to our use of yarn workspaces. We suspect that a regular call to e.g. the base project package.json:
and then in multiple package.jsons in those workspaces:
|
I have a dependency that loads from a git repo directly via
git+ssh://
.Before upgrading:
yarn.lock
contains the package with the correct commit hashnode_modules
contains the git repo with the correct commit hashAfter upgrading via
yarn upgrade
, I'd expect it to update the commit inyarn.lock
to the latest commit of the repo, as well as updating the repo innode_modules
.However, what happens is:
yarn.lock
contains the package with the updated commit hashnode_modules
does not get updated, it still contains the git repo with the state of the old commitAfter removing
node_modules
and runningyarn install
again:node_modules
still does not get updated (probably because it got loaded from the cache)Only when removing the folder manually from
~/.yarn-cache
, removingnode_modules
again, then runningyarn install
, it pulls the latest version of the repository.Please note that the
package.json
version did not change, only the commit hash did.yarn.lock
seems to handle this correctly, while the cache doesn't. This also works fine withnpm install
as it just pulls the repo every time.The text was updated successfully, but these errors were encountered: