Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR TS5069: Option 'declarationMap' cannot be specified without specifying option 'declaration' or option 'composite'. #30016

Open
nichoth opened this issue Aug 10, 2024 · 2 comments
Labels
stage: needs investigating Someone from Cypress needs to look at this topic: typescript type: bug

Comments

@nichoth
Copy link

nichoth commented Aug 10, 2024

Current behavior

Start cypress in a new project, follow the GUI prompts, choose e2e testing, run the first example test, todo, and it prints an error.

image
Error: Webpack Compilation Error
[tsl] ERROR
      TS5069: Option 'declarationMap' cannot be specified without specifying option 'declaration' or option 'composite'.

[tsl] ERROR
      TS5069: Option 'declarationMap' cannot be specified without specifying option 'declaration' or option 'composite'.

Desired behavior

Should run a test

Test code to reproduce

https://github.com/nichoth/example-cypress

Cypress Version

13.13.2

Node version

v20.11.1

Operating System

macOS 14.5

Debug Logs

Error: Webpack Compilation Error
[tsl] ERROR
      TS5069: Option 'declarationMap' cannot be specified without specifying option 'declaration' or option 'composite'.

[tsl] ERROR
      TS5069: Option 'declarationMap' cannot be specified without specifying option 'declaration' or option 'composite'.
    at Watching.handle [as handler] (/Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:212:23)
    at /Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Watching.js:303:9
    at Hook.eval [as callAsync] (eval at create (/Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)
    at Watching._done (/Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Watching.js:299:28)
    at /Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Watching.js:213:21
    at Compiler.emitRecords (/Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:919:5)
    at /Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Watching.js:191:22
    at /Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:885:14
    at Hook.eval [as callAsync] (eval at create (/Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/tapable/lib/Hook.js:18:14)
    at /Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:882:27
    at /Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:2818:7
    at done (/Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/neo-async/async.js:3522:9)
    at alreadyWritten (/Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:714:8)
    at /Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/webpack/lib/Compiler.js:802:19
    at /Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/node_modules/graceful-fs/graceful-fs.js:123:16
    at /Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16
    at /Users/nick/Library/Caches/Cypress/13.13.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3)

Other

No response

@lucaslosi
Copy link

lucaslosi commented Aug 12, 2024

same issue here.

I've pinned it down to the typescript version 5.5.4 . "typescript": "5.5.3" works fine.

here is my tsconfig if anyone want do look in to it:

{
    "$schema": "https://json.schemastore.org/tsconfig",
    "compilerOptions": {
        "baseUrl": ".",
        "allowJs": true,
        "composite": false,
        "declaration": true,
        "declarationMap": true,
        "esModuleInterop": true,
        "forceConsistentCasingInFileNames": true,
        "incremental": true,
        "inlineSources": false,
        "isolatedModules": true,
        "module": "ESNext",
        "moduleResolution": "node",
        "noEmit": true,
        "noUnusedLocals": false,
        "noUnusedParameters": false,
        "preserveWatchOutput": true,
        "removeComments": true,
        "resolveJsonModule": true,
        "skipLibCheck": true,
        "sourceMap": false,
        "strict": false,
        "target": "es2021",
        "types": ["cypress"]
    },
    "display": "Default",
    "exclude": ["node_modules", "node"]
}

@khitrenovich
Copy link

Same here, the error appears on Renovate bump of TS from 5.5.3 to 5.5.4

austeja-bentley added a commit to iTwin/object-storage that referenced this issue Aug 14, 2024
austeja-bentley added a commit to iTwin/object-storage that referenced this issue Aug 14, 2024
austeja-bentley added a commit to iTwin/object-storage that referenced this issue Aug 14, 2024
* Upgrade to axios 1.7.4

* Global overrides for vulnerable package

* Remove old global overrides

* Regenerate pnpm-lock file

* Fix frontend integration test build

* Disable frontend integration test declaration map generation because of an open issue cypress-io/cypress#30016

---------

Co-authored-by: Austeja Kalpakovaite <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this topic: typescript type: bug
Projects
None yet
Development

No branches or pull requests

4 participants