Yarn 2 requires Node ≥ 12.13.0; Node.js 18 satisfies this. Yarn 2 introduced PnP as the default, breaking many packages that relied on `node_modules` discovery. Yarn 3 and 4 significantly improved PnP compatibility. Upgrading to Yarn 4 (`yarn set version stable`) is strongly recommended. The `nodeLinker: node-modules` workaround is available but losing PnP eliminates Yarn 2's main benefit.
nodeLinker: node-modules