Yesterday everything was working fine, Goes to sleep, and now my test crash immediately giving me this error which doesn't mean anything to me. (Playwright 1.38) Not sure how to debug this ? 😦
Running 1 test using 1 worker
1) [chromium] › reprise/reprise.spec.ts:64:7 › I can complete funnel X-34
Error: ENOENT: no such file or directory, open '/var/folders/4l/025bhv0n53d2fnsjwj8077600000gn/T/playwright-transform-cache-501/49/util_4917612e01561eea77dd7b2a1d7550fb38e705ca.js'
This thread is trying to answer question "How to debug a test that crashes immediately without providing any relevant information?"
Strange error. Playwright transforms code from TypeScript to JavaScript 'on demand', 'just in time'. The transformation (or transpilation) of code is resource intensive, so Playwright stores the results in a cache.
In this case Playwright seems to assume some transformed code already exists in the cache, but by the time it wants to load it, it no longer exists.
Maybe you can try to clean up the tree with the transform cache, which is mentioned in the error message, hoping that a fully cleaned out cache will force Playwright to transform these files afresh.
You can also try to set the environment variable PWTEST_CACHE_DIR (in the tests' parent process) to another (empty) location of choice before starting the tests.
@refactoreric I finally bumped my playwright version, it seems that they fixed the issue recently : https://github.com/microsoft/playwright/pull/27607
It still happened to me today on Playwright 1.39.0 in VS Code's Test Explorer for the "Debug Test" option failed with the same error message:"Error: ENOENT: no such file or directory" ( https://github.com/microsoft/playwright/issues/27756)
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].