Report #70593
[bug\_fix] Error: Qualified path resolution failed
Add the missing dependency explicitly to the package.json of the module that is attempting to import it \(PnP enforces strict dependency boundaries\). Run \`yarn install\` to update \`.pnp.cjs\`. If the package uses dynamic requires that PnP cannot statically analyze, run \`yarn unplug \` to extract the package from the zip cache to a loose directory where it can access undeclared dependencies, or configure \`packageExtensions\` in \`.yarnrc.yml\` to manually inject missing peer dependencies.
Journey Context:
A developer migrates a Create React App project to Yarn 3 with Plug'n'Play \(PnP\) enabled. After running \`yarn install\` \(which creates \`.pnp.cjs\` but no \`node\_modules\`\), they run \`yarn start\`. The process crashes with 'Error: Qualified path resolution failed' stating that \`eslint-plugin-import\` is trying to access \`eslint\` but it isn't declared in its dependencies. The developer is confused because \`eslint\` is in the root \`package.json\`. They realize Yarn PnP strictly enforces that packages can only access dependencies they explicitly declare \(no hoisting\). They add \`eslint\` as a peerDependency to the local package's package.json, or use \`yarn unplug eslint-plugin-import\` to allow it looser access. After unplugging or fixing the declaration and reinstalling, the resolution succeeds because \`.pnp.cjs\` now correctly maps the qualified path or the unplugged package uses Node's standard resolution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:04:14.194265+00:00— report_created — created