Open
Description
Version
1.44.1
Steps to reproduce
- clone the repro repo https://github.com/Asvarox/playwright-ct-cache-repro
npm install
- run the tests
npm run test-ct
- move files from
src/
(App.tsx
andApp.spec.tsx
) tosrc/modules/
- run the tests again
npm run test-ct
Expected behavior
The tests should pass
Actual behavior
Tests are not run due to following error
RollupError: Could not resolve "./App" from "playwright/index.tsx"
file: /Users/olek/playwright-ct-cache-repro/playwright/index.tsx
at getRollupError (/Users/olek/playwright-ct-cache-repro/node_modules/rollup/dist/es/shared/parseAst.js:396:41)
at error (/Users/olek/playwright-ct-cache-repro/node_modules/rollup/dist/es/shared/parseAst.js:392:42)
at ModuleLoader.handleInvalidResolvedId (/Users/olek/playwright-ct-cache-repro/node_modules/rollup/dist/es/shared/node-entry.js:19102:24)
at ModuleLoader.resolveDynamicImport (/Users/olek/playwright-ct-cache-repro/node_modules/rollup/dist/es/shared/node-entry.js:19162:58)
at /Users/olek/playwright-ct-cache-repro/node_modules/rollup/dist/es/shared/node-entry.js:19049:32
3 did not run
which doesn't really say much
Additional context
The file paths the the components are cached in playwright/.cache/metainfo.json
file and in case any doesn't exist, the run fails without a proper explanation.
The best solution would probably be to verify the paths and invalidate the cache. Otherwise moving it to e.g. node_modules
would likely slightly improve the DX, as usually with this kind of errors people remove the folder hoping it'd fix things.
Environment
System:
OS: macOS 14.4.1
CPU: (10) arm64 Apple M1 Pro
Memory: 304.95 MB / 32.00 GB
Binaries:
Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v20.9.0/bin/yarn
npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
pnpm: 9.0.6 - ~/Library/pnpm/pnpm
bun: 1.0.2 - ~/.bun/bin/bun
IDEs:
VSCode: 1.89.1 - /usr/local/bin/code
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
@playwright/experimental-ct-react: ^1.44.1 => 1.44.1