Open
Description
Yarn supports a yarn-path
option, which allows you to point to a version of yarn within the repo. This makes it easy to ensure everyone working in the repo to be on the same version.
If this setting is specified, when patch-package
copies over the .yarnrc
to the temp folder, yarn
will fail because it doesnt also copy over the yarn version. I think instead of copying the yarnrc, we can instead read, modify, and write the file to point to the correct old path. I will link the PR with this approach below. Let me know what you think!
Metadata
Metadata
Assignees
Labels
No labels
Activity
lencioni commentedon Oct 26, 2021
Supporting yarn-path would be great! Today, this will fail for me like:
NMinhNguyen commentedon Nov 18, 2021
This is actually my bad - I introduced the copying of
.yarnrc
in #222 (matching the existing logic of copying.npmrc
) as I needed Yarn to point at the correct npm registry, but I also ran into thisyarn-path
issue and forgot to file it. A simple workaround is to comment outyarn-path
before you runpatch-package
, but your PR makes sense. Thanks for fixing 🙂