Report #75071
[bug\_fix] Error: Your application tried to access \[lodash\], but it isn't declared in your dependencies - request by \[utils\] YZ0001
Add the missing package as an explicit dependency to the package that uses it \(e.g., \`yarn add lodash\` in the specific workspace directory\). Alternatively, use \`packageExtensions\` in \`.yarnrc.yml\` to patch the dependency to declare its missing peer, or set \`pnpMode: loose\` in \`.yarnrc.yml\` \(not recommended\).
Journey Context:
Developer migrates repo to Yarn 3. Runs \`yarn install\`, then \`yarn start\`. Gets YZ0001: 'lodash not found'. Confused: 'lodash is in node\_modules\!'. Realizes there is no node\_modules. Checks .pnp.cjs. Sees that package \`utils\` tries to require lodash, but \`utils/package.json\` doesn't list lodash as a dep \(it was relying on hoisting from root\). Adds lodash to utils/package.json, reinstalls, works.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:36:20.976065+00:00— report_created — created