Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't initialise "wdio-html-nice-reporter". Error [ERR_REQUIRE_ESM]: require() of ES Module #99

Open
randquraan opened this issue Jun 9, 2023 · 4 comments

Comments

@randquraan
Copy link

I'm facing this issue for a week, I tried all the solutions but I keep getting that:

2023-06-09T07:57:14.388Z ERROR @wdio/local-runner: Failed launching test session: Error: Couldn't initialise "wdio-html-nice-reporter".
Error [ERR_REQUIRE_ESM]: require() of ES Module/node_modules/@wdio/reporter/build/index.js from /node_modules/wdio-html-nice-reporter/lib/htmlReporter.js not supported.
Instead change the require of index.js in /node_modules/wdio-html-nice-reporter/lib/htmlReporter.js to a dynamic import() which is available in all CommonJS modules.
at require.extensions. [as .js] (/node_modules/ts-node/dist/index.js:851:20)
at Object. (node_modules/wdio-html-nice-reporter/lib/htmlReporter.js:6:36)
at require.extensions. [as .js] (/node_modules/ts-node/dist/index.js:851:20)
at Object. (/node_modules/wdio-html-nice-reporter/lib/index.js:7:40)
at require.extensions. [as .js] (/node_modules/ts-node/dist/index.js:851:20)
at safeRequire (//node_modules/@wdio/utils/build/utils.js:189:16)
at initialisePlugin (/node_modules/@wdio/utils/build/initialisePlugin.js:37:44)
at BaseReporter.initReporter (/node_modules/@wdio/runner/build/reporter.js:154:58)
at Array.map ()
at new BaseReporter (//node_modules/@wdio/runner/build/reporter.js:22:50)
at Runner.run (/node_modules/@wdio/runner/build/index.js:78:26)
at safeRequire (/node_modules/@wdio/utils/build/utils.js:192:15)
at initialisePlugin (/node_modules/@wdio/utils/build/initialisePlugin.js:37:44)
at BaseReporter.initReporter (/node_modules/@wdio/runner/build/reporter.js:154:58)
at Array.map ()
at new BaseReporter (/node_modules/@wdio/runner/build/reporter.js:22:50)
at Runner.run( /node_modules/@wdio/runner/build/index.js:78:26)
at processTicksAndRejections (node:internal/process/task_queues:95:5)

@rpii
Copy link
Collaborator

rpii commented Jun 9, 2023 via email

@vdrulerz
Copy link

@rpii can you please help in sharing the direct file reference or the required changes in the configuration file, many people are struggling to get this reporter working with WDIO V8 so please help in sharing the same.

@samuelseverino
Copy link

I facing same issue! any solution?

@rpii
Copy link
Collaborator

rpii commented Jul 7, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants