Use `.ts` extension when creating Playwright config for TypeScript projects
See original GitHub issueDescribe the bug
I’ve seen a few reports of this. It appears to have been a known issue when the feature was added: https://github.com/sveltejs/kit/pull/4056#discussion_r813166060
I saw that someone fixed it by prefixing with some environment variable. Unforunately, I can’t find what that was at the moment
Reproduction
Create TypeScript + Playwright project from wizard
Logs
No response
System Info
latest
Severity
serious, but I can work around it
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Set up your test automation project with Playwright using ...
We will quickly create a tsconfig.json file (in root folder), to use better the TS features and avoid some JS syntax errors which...
Read more >Getting started with Playwright with Jest and TypeScript
We'll cover how to get up and running with Playwright using Jest as the test runner and how to set up the project...
Read more >Advanced: configuration | Playwright - CukeTest
Projects. Playwright Test supports running multiple test projects at the same time. This is useful for running the same tests in multiple configurations....
Read more >Documentation - Migrating from JavaScript - TypeScript
During our JS to TS migration, we'll need to separate our input files to prevent ... TypeScript uses a file called tsconfig.json for...
Read more >typescript - Playwright: "No named projects are specified in the ...
I moved the Playwright config to the project root folder and it seems to be working now.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Works again with the latest version of Playwright (1.20), which has been released just now.
Appears to have started with 1.0.0-next.292 when using
PW_EXPERIMENTAL_TS_ESMflag for tests with TypeScript. Backing down to@sveltejs/kit@1.0.0-next.291and tests are functional again. So something in the 291-292 changeset is conflicting with the experimental TS ESM flag for Playwright in the current stable release of playwright. As a result, if using@sveltejs/kit@1.0.0-next.292or above, consider installing playwright version1.20.0(currently taggedbeta) or above, or try the latest nightly release with@playwright/test@next.You’re using experimental features, so I’ll assume you know how to upgrade and downgrade your version of Node. If the browser window stops opening and tests fail as a result, reinstall playwright with
npx playwright install.