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

TypeScript Build Failure: global.d.ts(233,5): error TS2709: Cannot use namespace 'JestConfig' as a type. #808

Closed
mmichaelis opened this issue Aug 10, 2022 · 3 comments

Comments

@mmichaelis
Copy link

Describe the bug

We just tried migrating to jest-playwright 2.0.0, especially because of Jest 28 upgrade, as provided by #801. Unfortunately, build fails with:

.../[email protected]_qruclkpwe5tgscr3gxibacztji/node_modules/jest-playwright-preset/types/global.d.ts(233,5):
  error TS2709: Cannot use namespace 'JestConfig' as a type.

To Reproduce

Update to Jest-Playwright 2.0.0, use it with TypeScript and don't enable compiler option skipLibCheck (see TypeScript: TSConfig Reference).

See also at CodeSandbox:

CodeSandbox Example

Expected behavior

Build passes.

Desktop (please complete the following information):

  • OS: Windows
  • Playwright version: 2.0.0
  • jest-playwright version: 1.24.2
  • Jest: 28.1.3
  • @types/jest: 28.1.6"
mmichaelis added a commit to CoreMedia/ckeditor-plugins that referenced this issue Aug 10, 2022
Work around:

* playwright-community/jest-playwright#808

by adding `"skipLibCheck": true` to shared tsconfig.json.

See also:

* TypeScript: TSConfig Reference - skipLibCheck
  https://www.typescriptlang.org/tsconfig#skipLibCheck
@tbouffard
Copy link

This seems to be fixed in f839747 (commited right after the 2.0.0 release), but there is currently no available release including this fix.

@tbouffard
Copy link

@mxschmitt Is it possible to release a new version including the f839747 fix please?

@tbouffard
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants