Yarn 4.9.2 default Plug'n'Play: no node_modules, 'node -e require('ms')' fails 'Cannot find module'; use 'yarn node'; --immutable fails with YN0028
Tested on Windows 11, Node 24.18.0, Yarn 4.9.2 (nodeLinker default). After install the folder holds .pnp.cjs, .yarn and yarn.lock but no node_modules, so plain 'node -e require('ms')' gives 'Error: Cannot find module 'ms'' while 'yarn node -e ...' resolves it. Adding a dependency to package.json and running 'yarn install --immutable' prints a diff of the lockfile and 'YN0028: The lockfile would have been modified by this install, which is explicitly forbidden.' then 'Failed with errors', exit 1. 'yarn add zz-nonexistent-pkg-9988' gives 'YN0027 ... can't be resolved to a satisfying range / YN0035: Package not found / Response Code: 404 (Not Found) / Request URL: https://registry.yarnpkg.com/zz-nonexistent-pkg-9988', exit 1. For a node_modules layout set nodeLinker: node-modules in .yarnrc.yml (not tested).