Rayrun
← Back to Discord Forum

ES MODULE TS PLAYWRIGHT

tevo_b_20702_63068posted in #help-playwright
Open in Discord
tevo_b_20702_63068

Hej guys, question I am using ES modules, so in package.json have type:module , and using in package type:module , and I have following error , I need to have this type:module there, using playwright with typescript in monorepo. Any ideas how to fix this problem ? This is script : "test:rendering": " cross-env NODE_ENV=test playwright test --config=../../../framework/e2e-tests/playwright/playwright.config.ts modules/gallery/rendering-page/e2e/rendering/", I have only one config file for whole playwright for all playwright tests , I have lot of modules and in each module I need to have own folder e2e/ and there is placed all tests, but problem is with Playwright using CommonJS , and I am using ES Modules, how you solved this problem, because when I am in package and run rushx test:rendering I got following problem

Thx, for any response.

Snimka_obrazovky_2023-11-20_o_14.32.48.png

This thread is trying to answer question "How to fix the problem of using ES Modules with Playwright in a monorepo setup?"

2 replies

I recommend filing an issue on GitHub with a repro.

tevo_b_20702_63068

already did , no answer @mxschmitt

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].