Skip to content

Error when trying to publish reports: TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function #1521

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

Closed
Fryuni opened this issue Dec 31, 2020 · 2 comments

Comments

@Fryuni
Copy link

Fryuni commented Dec 31, 2020

I got this error just by enabling --publish:

TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received an instance of Object
    at checkListener (events.js:111:11)
    at ClientRequest.once (events.js:435:3)
    at new ClientRequest (_http_client.js:202:10)
    at Object.request (https.js:313:10)
    at Object.request (/<my-project-root>/node_modules/agent-base/patch-core.js:25:22)
    at HttpStream.sendRequest (/<my-project-root>/node_modules/@cucumber/cucumber/src/formatter/http_stream.ts:106:25)
    at IncomingMessage.<anonymous> (/<my-project-root>/node_modules/@cucumber/cucumber/src/formatter/http_stream.ts:100:18)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

Doesn't prevent me from working at all. I just wanted to try the new reports feature, using the --publish-quiet to remove the banner works fine.

Using version 7.0.0

@Fryuni Fryuni changed the title TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function Error when trying to publish reports: TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function Dec 31, 2020
@davidjgoss
Copy link
Contributor

davidjgoss commented Jan 3, 2021

Hi @Fryuni, are you still seeing this issue, and if so are you able to link to a repository where I can reproduce it?

I am able to publish reports successfully in this small example project with:

npm install
npx cucumber-js --publish

@davidjgoss
Copy link
Contributor

Closing as we've gone quiet here.

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

2 participants