Summary
Our service config sample is broken with the Playwright 1.61 release. Importing our base config into playwright.service.config now throws during module loading, so the sample no longer runs out of the box. This looks like a regression / contract break introduced in 1.61.
Impact
- The sample's playwright.service.config fails to load → no tests run.
- Affects customers using our sample as a starting point, since the base-config import pattern is what we ship.
Error
TypeError: context.conditions?.includes is not a function
at resolve (.../playwright/lib/common/index.js)
at ... playwright.service.config
Environment
- @playwright/test: 1.61.0
- OS: Windows (also reproduces on Linux CI)
- Node: 22.15–22.18 (see boundary below)
Root cause (observed)
The 1.61 sync loader assumes context.conditions is an Array and calls .includes(...). On some Node versions it is a Set, which has no .includes, so resolving our imported base config throws. This is a behavior/contract change vs. 1.60.
| Node |
context.conditions |
Result |
| 22.15 / 22.17 / 22.18 |
Set |
breaks |
| 22.19 / 22.20 / 26.x |
Array |
works |
Workarounds
- Upgrade Node to >= 22.19 (or Node 24/26).
- Pin @playwright/test < 1.61 (e.g. 1.55.0).
- Merge the base config inline into playwright.service.config instead of importing it (avoids the failing resolve path)
Summary
Our service config sample is broken with the Playwright 1.61 release. Importing our base config into playwright.service.config now throws during module loading, so the sample no longer runs out of the box. This looks like a regression / contract break introduced in 1.61.
Impact
Error
Environment
Root cause (observed)
The 1.61 sync loader assumes context.conditions is an Array and calls .includes(...). On some Node versions it is a Set, which has no .includes, so resolving our imported base config throws. This is a behavior/contract change vs. 1.60.
Workarounds