DevExpress / testcafe

A Node.js tool to automate end-to-end web testing.
https://testcafe.io
MIT License
9.83k stars 673 forks source link

Testcafe compile error as of 3.7.0-rc1 #8319

Closed matt-kxs closed 3 weeks ago

matt-kxs commented 3 weeks ago

What is your Scenario?

Trying to compile testcafe directly

What is the Current behavior?

node_modules/testcafe/ts-defs/index.d.ts:1774:34 - error TS2307: Cannot find module 'devtools-protocol/types/protocol-proxy-api' or its corresponding type declarations.

1774 type CDPSession = import('devtools-protocol/types/protocol-proxy-api').ProtocolProxyApi.ProtocolApi;

https://github.com/DevExpress/testcafe/compare/v3.6.2...v3.7.0-rc.1#diff-14707a13920b03dc0c1c5b82c179dc665e3d25d76c0b60a9f8ee1be54cd1b9ebR93

What is the Expected behavior?

Testcafe should compile without errors

What is the public URL of the test page? (attach your complete example)

None needed, just run tsc on a project with testcafe@3.7.0-rc.1

What is your TestCafe test code?

None needed

Your complete configuration file

No response

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

  1. Install testcafe@3.7.0-rc1.
  2. Run yarn tsc
  3. Notice error

TestCafe version

3.7.0-rc.1

Node.js version

18.18.2

Command-line arguments

yarn tsc

Browser name(s) and version(s)

No response

Platform(s) and version(s)

No response

Other

No response

github-actions[bot] commented 3 weeks ago

Thank you for submitting a bug report. We would love to help you investigate the issue. Please share a simple code example that reliably reproduces the bug. For more information, read the following article: How To Create a Minimal Working Example When You Submit an Issue. We look forward to your response.

matt-kxs commented 3 weeks ago

tsconfig file:

{
    "compilerOptions": {
        "target": "es2016", // Must be es2016
        "module": "commonjs", // Must be commonjs
        "noImplicitAny": true,
        "strict": true,
        "noImplicitThis": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "noImplicitReturns": true,
        "noFallthroughCasesInSwitch": true,
        "pretty": true,
        "types": [
            "testcafe",
            "node"
        ],
        "forceConsistentCasingInFileNames": true,
        "inlineSourceMap": true,
        "declaration": true,
        "declarationMap": true,
        "outDir": "./dist",
        "incremental": true
    },
    "exclude": [
        "./dist/**/*"
    ]
}

add empty .ts file to folder yarn init yarn add testcafe@3.7.0.rc.1 yarn tsc

Bayheck commented 3 weeks ago

Hello,

We released TestCafe version 3.7.0-rc.3.

Please try it and share your feedback.

matt-kxs commented 3 weeks ago

Issue is resolved, thank you!