Skip to content

[Cypress] TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'. #16963

@DaSchTour

Description

@DaSchTour

Current Behavior

With NX 16 Cypress E2E throws the TypeScript error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'.

Expected Behavior

Cypress runs normaly as with NX 15

GitHub Repo

No response

Steps to Reproduce

  1. Run cypress project that ran normaly with NX 15

tsconfig.json

{
  "extends": "../../tsconfig.base.json",
  "files": [],
  "include": [],
  "references": [
    {
      "path": "./tsconfig.e2e.json"
    }
  ]
}

tsconfig.e2e.json

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "sourceMap": false,
    "outDir": "../../dist/out-tsc",
    "allowJs": true,
    "types": ["cypress", "node"]
  },
  "include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"]
}

project.json target configuration

"executor": "@nx/cypress:cypress",
      "options": {
        "cypressConfig": "apps/…-e2e/cypress.config.ts",
        "tsConfig": "apps/…-e2e/tsconfig.e2e.json",
        "devServerTarget": "…:serve:e2e-local",
        "testingType": "e2e"
      },

From the failure logs it looks like the wrong tsconfig is used

Nx Report

>  NX   Report complete - copy this into the issue template

   Node   : 18.16.0
   OS     : darwin x64
   npm    : 9.5.1
   Hasher : Native
   
   nx                 : 16.1.4
   @nx/js             : 16.1.4
   @nx/jest           : 16.1.4
   @nx/linter         : 16.1.4
   @nx/workspace      : 16.1.4
   @nx/angular        : 16.1.4
   @nx/cypress        : 16.1.4
   @nx/devkit         : 16.1.4
   @nx/esbuild        : 16.1.4
   @nx/eslint-plugin  : 16.1.4
   @nx/nest           : 16.1.4
   @nx/node           : 16.1.4
   @nx/plugin         : 16.1.4
   @nx/rollup         : 16.1.4
   @nrwl/tao          : 16.1.4
   @nx/webpack        : 16.1.4
   nx-cloud           : 16.0.5
   typescript         : 5.0.4
   ---------------------------------------
   Community plugins:
   @compodoc/compodoc               : 1.1.19
   @fortawesome/angular-fontawesome : 0.12.1
   @ionic/angular                   : 6.7.4
   @jscutlery/semver                : 2.30.1
   @nestjs-fixed/ng-universal       : 7.0.1
   @ngneat/spectator                : 14.0.0
   @ngrx/component                  : 15.4.0
   @ngrx/component-store            : 15.4.0
   @ngrx/data                       : 15.4.0
   @ngrx/effects                    : 15.4.0
   @ngrx/entity                     : 15.4.0
   @ngrx/eslint-plugin              : 15.4.0
   @ngrx/router-store               : 15.4.0
   @ngrx/schematics                 : 15.4.0
   @ngrx/store                      : 15.4.0
   @ngrx/store-devtools             : 15.4.0
   @nguniversal/builders            : 16.0.0
   @nguniversal/common              : 16.0.0
   @nguniversal/express-engine      : 16.0.0
   @nx-tools/nx-container           : 4.0.3
   @nxext/capacitor                 : 15.7.0
   @nxext/ionic-angular             : 15.7.0
   @trellisorg/make-buildable       : 0.0.12
   @twittwer/compodoc               : 1.9.0
   apollo-angular                   : 4.2.1
   ng-mocks                         : 14.10.0
   ngx-build-plus                   : 15.0.0
   ngx-deploy-npm                   : 5.2.0
   nx-stylelint                     : 15.0.0

Failure Logs

Error: Webpack Compilation Error
/Users/…/Projekte/frontend/apps/…-e2e/tsconfig.json
[tsl] ERROR
      TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'.
    at handle (/Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:231:23)
    at finalCallback (/Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:257:39)
    at /Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:306:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:154:20)
    at /Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:304:22
    at Compiler.emitRecords (/Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:499:39)
    at /Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:298:10
    at /Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:485:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:154:20)
    at /Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:482:27
    at /Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:2818:7
    at done (/Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:3522:9)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:154:20)
    at /Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:464:33
    at /Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:143:16
    at /Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:143:16
    at /Users/…/Library/Caches/Cypress/12.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:61:14
    at FSReqCallback.oncomplete (node:fs:198:23)

Operating System

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

Additional Information

No response

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions