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

TypeError [ERR_INVALID_ARG_TYPE] #185

Open
yacov-simplex opened this issue Jan 17, 2024 · 0 comments
Open

TypeError [ERR_INVALID_ARG_TYPE] #185

yacov-simplex opened this issue Jan 17, 2024 · 0 comments

Comments

@yacov-simplex
Copy link

yacov-simplex commented Jan 17, 2024

Hi

When I use reportportal/agent-js-mocha alongside with mocha-multi-reporters

I get the following error

Failed to load reporter: "@reportportal/agent-js-mocha" or "/Users/yacovgavrilov/ws/simplex/buy-checkout/@reportportal/agent-js-mocha": TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function. Received undefined
    at Object.promisify (node:internal/util:329:3)
    at Object.<anonymous> (/Users/yacovgavrilov/ws/simplex/buy-checkout/node_modules/@reportportal/client-javascript/statistics/client-id.js:7:21)

From my findings it seems that for some reason using util.promisify (statistics/client-id.js) is causing this error.

The error is gone if I use const fs = require('fs/promises'); instead and remove all the util.promisify calls.

FYI Using @reportportal/agent-js-mocha reporter without the mocha-multi-reporters is working fine.

What can be the reason for that?
Can we swith to fs/promises?

My node version is v16.16.0

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

No branches or pull requests

2 participants