-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
Bug 🐛help wantedIssues that are free to take by anyone interestedIssues that are free to take by anyone interested
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
v9.21.1
Node.js Version
24 LTS
Mode
Standalone Mode
Which capabilities are you using?
capabilities: [{
browserName: 'chrome'
}],What happened?
I upgrade WDIO in my project from v9.20.0 to the latest v9.21.1 and E2E tests stopped executing because of:
SyntaxError: The requested module 'istanbul-lib-coverage' does not provide an export named 'createCoverageMap'
What is your expected behavior?
No issues expected
How to reproduce the bug.
- Create new e2e test project with TypeScript support using
pnpm create wdio@latest - Add
pnpm i -D istanbul-lib-coverage @types/istanbul-lib-coverage - try to import a couple of functions from 'istanbul-lib-coverage' and print them in
wdio.conf.ts
import { createCoverageSummary, createCoverageMap } from 'istanbul-lib-coverage'
console.log(createCoverageSummary);
console.log(createCoverageMap);
You will get surprised to see that while there are no complains on createCoverageSummary, the test runner will fail with:
2025-12-18T00:32:20.491Z ERROR @wdio/config:ConfigParser: Failed loading configuration file: file:///Users/user/Documents/sandboxes/istanbul-typeimport-wdio-test/wdio.conf.ts: The requested module 'istanbul-lib-coverage' does not provide an export named 'createCoverageMap'
Pretty weird, considering the fact that both functions are declared the same way in original 'istanbul-lib-coverage' sources and in type definitions.
Relevant log output
❯ pnpm run wdio
> istanbul-typeimport-wdio-test@ wdio /Users/user/Documents/sandboxes/istanbul-typeimport-wdio-test
> wdio run ./wdio.conf.ts
2025-12-18T00:32:20.491Z ERROR @wdio/config:ConfigParser: Failed loading configuration file: file:///Users/user/Documents/sandboxes/istanbul-typeimport-wdio-test/wdio.conf.ts: The requested module 'istanbul-lib-coverage' does not provide an export named 'createCoverageMap'
/Users/user/Documents/sandboxes/istanbul-typeimport-wdio-test/wdio.conf.ts:1
import { createCoverageSummary, createCoverageMap } from 'istanbul-lib-coverage'
^
SyntaxError: The requested module 'istanbul-lib-coverage' does not provide an export named 'createCoverageMap'
at #asyncInstantiate (node:internal/modules/esm/module_job:302:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:405:5)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:660:26)
at async _ConfigParser.addConfigFile (file:///Users/user/Documents/sandboxes/istanbul-typeimport-wdio-test/node_modules/.pnpm/@wdio+config@9.20.1/node_modules/@wdio/config/build/node/index.js:269:30)
at async _ConfigParser.initialize (file:///Users/user/Documents/sandboxes/istanbul-typeimport-wdio-test/node_modules/.pnpm/@wdio+config@9.20.1/node_modules/@wdio/config/build/node/index.js:241:7)
at async Launcher.initialize (file:///Users/user/Documents/sandboxes/istanbul-typeimport-wdio-test/node_modules/.pnpm/@wdio+cli@9.20.1_@types+node@25.0.3_expect-webdriverio@5.5.0/node_modules/@wdio/cli/build/index.js:916:5)
at async Launcher.run (file:///Users/user/Documents/sandboxes/istanbul-typeimport-wdio-test/node_modules/.pnpm/@wdio+cli@9.20.1_@types+node@25.0.3_expect-webdriverio@5.5.0/node_modules/@wdio/cli/build/index.js:840:5)
ELIFECYCLE Command failed with exit code 1.Code of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bug 🐛help wantedIssues that are free to take by anyone interestedIssues that are free to take by anyone interested