Skip to content

Infered open-cypress task fails with TS5098 #31616

Closed
@ekatioz

Description

@ekatioz

Current Behavior

When using the infered open-cypress task on a clean new workspace (preset=next), the cypess window shows a loading state and an TSError ist logged. (see Failure Logs)

Expected Behavior

The cypress window should show the tests. There should not be errors in the the log.

GitHub Repo

https://github.com/ekatioz/clean-nx-workspace

Steps to Reproduce

  1. npx create-nx-workspace --preset=next (or use provided Repo and install dependencies)
  2. npx nx open-cypress clean-nx-workspace-e2e

Nx Report

Node           : 22.15.0
OS             : darwin-arm64
Native Target  : aarch64-macos
npm            : 10.9.2

nx                     : 21.2.0
@nx/js                 : 21.2.0
@nx/eslint             : 21.2.0
@nx/workspace          : 21.2.0
@nx/cypress            : 21.2.0
@nx/devkit             : 21.2.0
@nx/eslint-plugin      : 21.2.0
@nx/module-federation  : 21.2.0
@nx/next               : 21.2.0
@nx/react              : 21.2.0
@nx/web                : 21.2.0
@nx/webpack            : 21.2.0
typescript             : 5.8.3
---------------------------------------
Registered Plugins:
@nx/js/typescript
@nx/next/plugin
@nx/cypress/plugin
@nx/eslint/plugin
---------------------------------------
Cache Usage: 0.00 B / 92.64 GB

Failure Logs

NX   @clean-nx-workspace/clean-nx-workspace-e2e:open-cypress

  > cypress open


  DevTools listening on ws://127.0.0.1:58838/devtools/browser/727c401c-c2d6-4ab0-a6ef-cf7eb2871d7b
  Missing baseUrl in compilerOptions. tsconfig-paths will be skipped
  /Users/marcoernst/Library/Caches/Cypress/14.4.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/dist/index.js:308
          return new TSError(diagnosticText, diagnosticCodes, diagnostics);
                 ^
  TSError: ⨯ Unable to compile TypeScript:
  error TS5098: Option 'customConditions' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'.

      at createTSError (/Users/marcoernst/Library/Caches/Cypress/14.4.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/dist/index.js:308:16)
      at reportTSError (/Users/marcoernst/Library/Caches/Cypress/14.4.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/dist/index.js:311:23)
      at /Users/marcoernst/Library/Caches/Cypress/14.4.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/dist/index.js:683:17
      at Object.compile (/Users/marcoernst/Library/Caches/Cypress/14.4.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/dist/index.js:740:35)
      at Module.m._compile (/Users/marcoernst/Library/Caches/Cypress/14.4.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/dist/index.js:853:36)
      at node:internal/modules/cjs/loader:1895:10
      at Object.require.extensions.<computed> [as .js] (/Users/marcoernst/Library/Caches/Cypress/14.4.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/dist/index.js:856:16)
      at Module.load (node:internal/modules/cjs/loader:1465:32)
      at Function._load (node:internal/modules/cjs/loader:1282:12)
      at TracingChannel.traceSync (node:diagnostics_channel:322:14) {
    diagnosticCodes: [ 5098 ]
  }
  █

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions