nx
nx copied to clipboard
fix(core): ensure yarn runs install with correct version
Current Behavior
Installation of packages using ensurePackage and create-nx-workspace fail for Yarn Berry because they create temp folder that might be targeting different yarn version
Let's assume this folder structure:
$HOME
- my-berry-projects // subfolder with
.yarnrc.yaml // berry version set
- my-project
package.json // <- this is our project
.yarnrc.yaml // classic version set
If we run yarn install in the my-project folder we would be using yarn berry. But our CNW and ensurePackage generate a temp folder outside of the $HOME, so running yarn would end up in using yarn classic which then causes issues.
Expected Behavior
Before running yarn install or yarn add in the temp folder we need to run yarn set version classic/berry according to the local version of our project to make sure two versions are in-sync.
Related Issue(s)
Fixes #
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| nx-dev | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 7, 2023 8:03am |
☁️ Nx Cloud Report
CI is running/has finished running commands for commit 8b0f6ef0b4430ad26cb86ed53bd2b29415029b0c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this branch
✅ Successfully ran 1 target
Sent with 💌 from NxCloud.
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.