You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After playing around with some of my frontend project's package.json dependencies, I ended up yeeting some of the deps that provided node polyfills along the way, and that made this lib no longer work because of this line:
The @openrpc/client-js library has a bug[1] and this package needs to be
added to make it work. I don't fully understand the details :(
This package is a dependency of codemirror-languageserver and other
people seem to have the same issue[2].
[1]: open-rpc/client-js#310
[2]: FurqanSoftware/codemirror-languageserver#26
Describe the bug
After playing around with some of my frontend project's package.json dependencies, I ended up yeeting some of the deps that provided node polyfills along the way, and that made this lib no longer work because of this line:
client-js/src/transports/TransportRequestManager.ts
Line 6 in f1c9b04
More specifically, when my HTTP Transport is constructed, it would hit this line, and I would get
EventEmitter is not a constructor
client-js/src/transports/TransportRequestManager.ts
Line 24 in f1c9b04
I had to install
events@^3.3.0
to fix it.Expected behavior
This lib should either depend on
events
so that I don't need to require it myself, or it should use APIs that actually exist in the browser.The text was updated successfully, but these errors were encountered: