test(web): Playwright webServer fails on missing cache-prewarm instrumentation import #70

Open
opened 2026-05-24 06:42:06 +00:00 by simon · 0 comments
Owner

Targeted Playwright runs can fail before executing tests because the Next.js instrumentation hook imports ./lib/agent/cache-prewarm dynamically and the module is missing from the app build context. Evidence: running BETTER_AUTH_URL=http://localhost:3000 BETTER_AUTH_SECRET=test-secret pnpm --dir apps/web exec playwright test tests/e2e/hosts/vulnerabilities.spec.ts --project=chromium starts the configured webServer on localhost:3100, then exits with MODULE_NOT_FOUND from instrumentation.ts:38 for ./lib/agent/cache-prewarm. This blocks local E2E validation for unrelated UI work before any spec runs. Fix direction: either restore/export the cache-prewarm module expected by instrumentation.ts, or guard the instrumentation import so test/dev startup can proceed when cache prewarming is unavailable.

Targeted Playwright runs can fail before executing tests because the Next.js instrumentation hook imports ./lib/agent/cache-prewarm dynamically and the module is missing from the app build context. Evidence: running BETTER_AUTH_URL=http://localhost:3000 BETTER_AUTH_SECRET=test-secret pnpm --dir apps/web exec playwright test tests/e2e/hosts/vulnerabilities.spec.ts --project=chromium starts the configured webServer on localhost:3100, then exits with MODULE_NOT_FOUND from instrumentation.ts:38 for ./lib/agent/cache-prewarm. This blocks local E2E validation for unrelated UI work before any spec runs. Fix direction: either restore/export the cache-prewarm module expected by instrumentation.ts, or guard the instrumentation import so test/dev startup can proceed when cache prewarming is unavailable.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carrtech/ct-ops#70
No description provided.