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

WebsocketTransportClient is not a constructor #254

Closed
mattydono opened this issue Jan 25, 2023 · 7 comments
Closed

WebsocketTransportClient is not a constructor #254

mattydono opened this issue Jan 25, 2023 · 7 comments
Assignees
Labels
1.0 Pullrequests & issues related to the Typescript rewrite and 1.0 release

Comments

@mattydono
Copy link

image

Expected Behavior

instantiate a new WebsocketClientTransport class with constructor args of ClientOptions

Actual Behavior

WebsocketClientTransport registers a type error

Steps to Reproduce

packages:

image

attempt to instantiate new WebsocketClientTransport class

@viglucci
Copy link
Member

viglucci commented Jan 25, 2023

Hi @mattydono

Could you please provide a reproduction example?

I wasn't able to reproduce this through a simple example/test. Please see: https://github.com/viglucci/rsocket-js-websocket-example

Based on your screenshot, I suspect you are trying to use RSocket-js in a client-side application. Are you using Webpack, Vite, or another bundler?

@mattydono
Copy link
Author

mattydono commented Jan 25, 2023

So the only notable difference is that I'm using RxRequestersFactory:

image

image

edit: I'm now receiving:

image

resulting from the above, I've only began to run into issues since trying to move away from flowables.

@viglucci viglucci self-assigned this Jan 25, 2023
@viglucci viglucci added the 1.0 Pullrequests & issues related to the Typescript rewrite and 1.0 release label Jan 25, 2023
@viglucci
Copy link
Member

Thanks for that additional info.

Can you answer this question:

Based on your screenshot, I suspect you are trying to use RSocket-js in a client-side application. Are you using Webpack, Vite, or another bundler?

RSocket used to provide an alternative implementation of Buffer, however this is no longer the case in v1.X.

This article may help: https://viglucci.io/articles/how-to-polyfill-buffer-with-webpack-5

You can also reference the WebPack example:

@mattydono
Copy link
Author

mattydono commented Jan 25, 2023

I'm using vite, reading into the above

@viglucci
Copy link
Member

Concerning vite, you may also wish to reference this previous issue: #195 (comment)

@viglucci
Copy link
Member

viglucci commented Apr 8, 2023

Hey @mattydono were you able to find a solution here? If so I would like to close out this issue.

@viglucci
Copy link
Member

viglucci commented Sep 5, 2023

Closing this out as haven't heard back from Author.

@viglucci viglucci closed this as completed Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0 Pullrequests & issues related to the Typescript rewrite and 1.0 release
Projects
None yet
Development

No branches or pull requests

2 participants