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: The "emitter" argument must be an instance of EventEmitter or EventTarget. Received an instance of AbortSignal #498

Open
himself65 opened this issue Apr 7, 2023 · 3 comments

Comments

@himself65
Copy link

TypeError: The "emitter" argument must be an instance of EventEmitter or EventTarget. Received an instance of AbortSignal
    at new NodeError (node:internal/errors:399:5)
    at getEventListeners (node:events:914:9)
    at new Request (node:internal/deps/undici/undici:7138:17)
    at new Ky (file:///Users/himself65/Code/AFFiNE/node_modules/ky/source/core/Ky.ts:178:18)
    at Function.create (file:///Users/himself65/Code/AFFiNE/node_modules/ky/source/core/Ky.ts:24:14)
    at Function.ky.<computed> [as post] 

Upstream: nodejs/undici#1910

@belden
Copy link

belden commented Aug 16, 2023

@himself65 / @sindresorhus this was the first search result for an error I saw when upgrading my application (which does not use this project) from node-16 to node-18.

I see that this project tries to use node-14, and I wonder whether @himself65 was using this with node >= 18 when encoutering this issue.

I don't have a solution for my upgrade yet but wanted to share what I know so far.

Update, the solution in my case was to stop importing abort-controller from npm and use the built-in that I get as part of upgrading node-16 -> node-18.

@himself65
Copy link
Author

I think this is a bug in the old nodejs 18 version, now it seems to be fixed

@himself65
Copy link
Author

Solution nodejs/undici#1910 (comment)

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