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

ethereumjs/util require node polyfill for browser #3439

Open
wighawag opened this issue May 26, 2024 · 3 comments
Open

ethereumjs/util require node polyfill for browser #3439

wighawag opened this issue May 26, 2024 · 3 comments

Comments

@wighawag
Copy link
Contributor

I have an issue with @ethereumjs/util It needs a node polyfill for the browser, which ideally shouldn't be necessary in a browser environment.

Here is the link to the imports in question

import { EventEmitter } from 'events'

@acolytec3
Copy link
Contributor

acolytec3 commented May 26, 2024

This is a known issue. Unfortunately, we do not currently have an obvious solution to it aside from polyfilling with something like eventemitter3. I have not yet found a replacement for node:events that is 100% API compatible and we need deep compatibility in order to maintain the functionality of our asyncEventEmitter class.

@holgerd77
Copy link
Member

@acolytec3 but we can switch over along our next breaking release round, right (or not)? That was my conclusion from the last exchange on this, but might be wrong.

@wighawag Targeted for autumn 2024 (sorry, no short cuts here unfortunately, we cannot do breaking releases too often).

@acolytec3
Copy link
Contributor

If we can find a fully compatible event emitter class, potentially. eventEmitter3 has some incompatibility that I couldn't solve when I initially tried integrating it inside the asyncEventEmitter class. If/when we pick this up, I can explore again.

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

3 participants