Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Dependencies missing on node #716

Closed
moozzyk opened this issue Aug 11, 2017 · 4 comments
Closed

Dependencies missing on node #716

moozzyk opened this issue Aug 11, 2017 · 4 comments

Comments

@moozzyk
Copy link
Contributor

moozzyk commented Aug 11, 2017

We use a number of things in the TS client which are not available by default on nodejs and currently needs to be polyfilled:

  • XmlHttpRequest
  • WebSockets
  • EventSource
  • atob()/btoa

We need to decide what to do with these dependencies. As per #699 (comment) we could:

  • continue to require polyfilling on nodejs
  • implement dependency injection
  • build a nodejs version with different sources
  • not support some these features (mostly about atob/btoa - used for sending binary protocol over text tansports).
@ssougnez
Copy link

Hi,

I'm currently facing the issue that XMLHttpRequest is not defined under NodeJs. As I read this post, I notice that you plan on doing something to fix this, but I was wondering if you had a temporary solution that I could use to polyfill XMLHttpRequest until you fix this issue ?

Btw, I don't know if it's correct, but so far, I'm using SignalR this way:

const SignalR = require("@aspnet/signalr-client/dist/src/index");

I'm using it in a Azure app function.

Thanks a lot

@ssougnez
Copy link

Hehe, works like a charm, thanks a lot !

I'm using signalR Core for some weeks now and I can really see all the work you're putting out in it and it's pretty awesome. Keep up the good work, it's really becoming awesome and easy to use ;-)

@analogrelay
Copy link
Contributor

Some other issues will improve the NodeJS behavior: #1317 , #1212 . We're going to close this issue because we don't plan to implement WebSocket/EventSource polyfills for node.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants