Nx
Enterprise
Nx
fix(testing): set moduleResolution to node in Cypress tsconfig to prevent TS5095 error (#33726) 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). --------- Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
nx-cloud record -- nx-cloud conformance:check
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
nx-cloud record -- nx-cloud conformance:check
Click to copy
Linux
4 CPU cores
5ef02e4c
master