You may sometimes need to use node_modules on just part of your workspace (for example, if you use React-Native).
node_modules project.mkdir nm-packages/myproj touch nm-packages/myproj/yarn.lock
node-modules linker :.yarnrc.yml at the root of your monorepo:pnpIgnorePatterns: - ./nm-packages/**
yarn install to apply pnpIgnorePatterns in the repo root.cd nm-packages/myproj && yarn to install the now isolated project.
© 2016–present Yarn Contributors
Licensed under the BSD License.
https://yarnpkg.com/getting-started/recipes