Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update previously patched package with Yarn Berry

I'm using [email protected] in my project.

I have patched a package (@pkg/pkg) with the command yarn patch @pkg/pkg and I am using it as a devDependency with the patch: protocol.

Now I need to make another patch to the same package - but when I run the same command I get Multiple candidate packages found [...].

It works when trying to target the original package (using yarn patch @pkg/[email protected]), but I can't seem to find a way to target the patched project.

Any skilled yarn developer out there?

(Possibly useful information: I cannot use the resolutions field for the patch since @pkg/pkg is a CLI which does not seem to work with this approach)

like image 280
SchlagerKhan Avatar asked Oct 15 '25 09:10

SchlagerKhan


1 Answers

The solution was to choose the patch suggested with the error and encapsule it in qoutes such as:

yarn patch "patch:..."

like image 53
SchlagerKhan Avatar answered Oct 19 '25 13:10

SchlagerKhan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!