

Now, you’d go to the specific package.json and set the installConfig option to avoid hoisting that whole workspace. Previously, you’d list in the nohoist option which packages should not be hoisted to the top-level node_modules folder, and all sub-packages would follow that. We used the nohoist option in our package.json, which has a slightly different behavior in Yarn 3. yarn/releases/yarn-1.22.11.cjs, which I won’t be needing anymore. yarnrc.yml (keep reading and you’ll know what issue does this excerpt hold here): I was actually using those to connect with my private npm repository. This took me some time to figure out, but Yarn looks for the yarn.locks outside the root folder to mark that dir as a possible node_modules-compatible sub-package. Also, if you plan on using Zero Install, go check that section for more on gitignoresĪlso go ahead and delete all yarn.lock files that aren’t in the root of your project. Here I recommend the gitignore plugin from oh-my-zsh, which allows me to just run gi yarn >.

After sitting through a 15 minute yarn install I said “enough is enough” and I decided to migrate to the recently announced Yarn 3 with PnP support to get rid of our install process.
