-
Notifications
You must be signed in to change notification settings - Fork 7
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
Playwright tests broken on Node.js ≥23.6.0 due to type stripping feature #902
Comments
Playwright issue says its not their problem and recommends using Tangentially, the Playwright docs say about TypeScript: "Note that Playwright does not check the types and will run tests even if there are non-critical TypeScript compilation errors. We recommend you run TypeScript compiler alongside Playwright." |
I found that issue too, but find it strange that Node.js is now suddenly running code with TypeScript types included. I'd expected the TypeScript types to be stripped out before running regardless of the Node.js version. |
Edit: will post that to playwright issue. I ran into the same problem. After removing all enums, Playwright completely breaks with a node "$basedir/../playwright/cli.js" "$@" For Node.js 23+, this needs to be changed to: node --no-experimental-strip-types "$basedir/../playwright/cli.js" "$@" Without this change, the tests won’t start. Since Playwright has its own mechanism for running TypeScript files, Node.js interferes with its type-stripping feature. Reference: Node.js TypeScript API Temporary SolutionUntil this is fixed, in "scripts": {
"test": "node --no-experimental-strip-types node_modules/playwright/cli.js test"
} Error
|
Node.js 23.6.0 enables the type stripping feature by default. This breaks our Playwright tests:
We are currently requiring Node.js 22 (LTS) and don't support Node.js 23 officially, but it might be an issue that we have to resolve at some point in the future.
The text was updated successfully, but these errors were encountered: