Skip to content

[🐛 Bug]: V9: cannot run tests using node.js v18.16.0 #13480

@mjohnstonkura

Description

@mjohnstonkura

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

9.0.7

Node.js Version

18.16.0

Mode

WDIO Testrunner

Which capabilities are you using?

No response

What happened?

Upgraded to V9. Attempted to run the tests and was presented with an error. SyntaxError: The requested module 'node:events' does not provide an export named 'addAbortListener'

What is your expected behavior?

Since nodejs v18 is supported I would have expected it to work. Doing a little digging I found events.addAbortListener(signal, listener) was added as an experimental feature in Added in: v20.5.0, v18.18.0. Node 18 versions under v18.18.0 won't currently work.

How to reproduce the bug.

I can reproduce the issue with the jasmine boilerplate project. https://github.com/webdriverio/jasmine-boilerplate
npm i then npm run test:local. Make sure you have nodejs v18.16.0 installed.

Relevant log output

> jasmine-boilerplate@1.0.0 test:local
> wdio run wdio.local.conf.ts

file:///C:/Users/mjohnston/Downloads/jasmine-boilerplate-main/node_modules/execa/lib/utils/max-listeners.js:1
import {addAbortListener} from 'node:events';
        ^^^^^^^^^^^^^^^^
SyntaxError: The requested module 'node:events' does not provide an export named 'addAbortListener'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

Node.js v18.16.0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions