Report #70298
[bug\_fix] Error: Your application tried to access eslint, but it isn't declared in your dependencies; this only works when dependency eslint is declared in dependencies or devDependencies
Add the package you import directly to your project's \`dependencies\` or \`devDependencies\`. If a transitive dependency is missing a package it imports, extend it in \`.yarnrc.yml\` using \`packageExtensions\` to declare the missing dependency for that package.
Journey Context:
You migrate a repo from Yarn 1 to Yarn Berry with Plug'n'Play enabled and run \`yarn install\`. Everything installs, but \`yarn dev\` crashes with \`Your application tried to access eslint, but it isn't declared in your dependencies\`. In Yarn Classic the package was hoisted to the root, so your code could \`require\('eslint'\)\` even though it was only a transitive dependency. PnP's strict resolution only allows a package to access what it declares. You add \`eslint\` to \`devDependencies\` because your own code uses it, and you add a \`packageExtensions\` entry for the plugin that forgot to declare its own dependency. The dev server starts because Yarn now has an explicit graph edge for every import.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:35:01.486426+00:00— report_created — created