Skip to content

Conversation

@fALKENdk
Copy link
Contributor

@fALKENdk fALKENdk commented Dec 5, 2025

When generating Cypress component testing in Angular workspaces, the base tsconfig sets moduleResolution to 'bundler' which causes TS5095 errors because 'bundler' requires module to be 'preserve' or 'es2015+'.

Cypress runs in Node.js and should use Node.js module resolution instead. This fix sets moduleResolution to 'node' for Cypress tsconfig.json templates.

Current Behavior

When generating Cypress component testing configuration in Angular workspaces, the generated cypress/tsconfig.json inherits moduleResolution: "bundler" from the workspace base config. Since Cypress uses module: "commonjs" for Node.js runtime, this causes TypeScript compiler error TS5095: "Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."

Expected Behavior

The generated cypress/tsconfig.json should explicitly set moduleResolution: "node" to match the module: "commonjs" setting, preventing TS5095 errors. This aligns with how NestJS applications handle the same issue (see #33607).

…vent TS5095 error

When generating Cypress component testing in Angular workspaces, the base tsconfig sets
moduleResolution to 'bundler' which causes TS5095 errors because 'bundler' requires module to be
'preserve' or 'es2015+’.
Cypress runs in Node.js and should use Node.js module resolution instead. This fix sets
moduleResolution to 'node' for Cypress tsconfig.json templates.
Related to nrwl#33607 (NestJS fix for same issue)
@fALKENdk fALKENdk requested a review from a team as a code owner December 5, 2025 20:53
@fALKENdk fALKENdk requested a review from jaysoo December 5, 2025 20:53
@netlify
Copy link

netlify bot commented Dec 5, 2025

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit a72d5c6

@vercel
Copy link

vercel bot commented Dec 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nx-dev Ready Ready Preview Dec 15, 2025 9:57pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant