Report #104212
[bug\_fix] Cannot find module 'X' or its corresponding type declarations
Ensure the package is listed in package.json dependencies, the module path is correct, and the package's \`exports\` field \(if present\) allows the subpath. Use \`--experimental-specifier-resolution=node\` for Node < 16 or update to Node 16\+.
Journey Context:
A developer using a modern npm package \(e.g., \`uuid\` v9\) tried to \`require\('uuid'\)\` from a subdirectory and got 'Cannot find module'. The package had an \`exports\` field that only allowed the main entry. By reading the package's README and Node's package entry conventions, the developer realized they needed to reference the exact export path or import as \`import \{ v4 \} from 'uuid'\`. Changing to \`import\` fixed it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-19T20:03:02.717770+00:00— report_created — created