-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
Error after upgrade prevents package.json
and yarn.lock
from being updated
#86
Comments
I just ran into this again. Any ideas how we can fix this? |
Hi 👋 Thanks for the report! If I understand correctly, it sounds like if That's interesting behaviour! I suppose in that case it is not a good idea for |
Yes, that's correct. I wish that wasn't the behaviour of yarn 😒 Maybe we should file this as a yarn bug. Failing that we can get this behaviour fixed in yarn, I like your idea. |
Hi @OliverJAsh I figured out a pragmatic solution: calling |
Thanks! |
When I try to upgrade a dependency (using
yarn upgrade
) and I get a new patch failure error frompatch-package
, I'm left in a weird state where mynode_modules
do reflect the changes, but mypackage.json
andyarn.lock
do not.My presumption is that the patch-package error stops Yarn from commiting the update to the manifest and lockfile. I'm not sure this is desired behaviour, or whether this is a
patch-package
problem or a Yarn problem.Because of the error message, I thought it was safe to go in and re-apply my patch. So I edited
node_modules
and ranpatch-package
to generate the new patch, but because the upgrade was not committed,patch-package
created a patch of a diff between the version before the upgrade and the version after the upgrade with my changes, which took me awhile to realise.If we can't fix the bug whereby upgrades are not committed due to the error, we should provide clearer steps in the error message to avoid this.
The text was updated successfully, but these errors were encountered: