Xhr-request not supported?

Trying to use xhr-request in a notebook, or from a package that uses it, results in TypeError: Method _external called on incompatible receiver #<TLSWrap>:

Should the npm package detect tonic/runkit is in use and use the request package instead of xhr-package?

I believe it is working now, could you check if this is still a problem for you?

Thanks for looking at it! So, I tried running that same example I posted earlier in an existing notebook and also in a new one, but in both cases I get the same problem as before. Should I do something different?

Ah, I am able to reproduce it. The problem is that the returned object has a property that is crashing our serializer. This happens sometimes when native node objects are implemented improperly (getOwnPropertyDescriptor will actually attempt to mutate the object). Not saying that is what is happening here, but could be.

Luckily, while you wait for us to figure out what is truly up, there is an easy workaround which is simply to put anything after the call, that way that is logged instead of the returned object. So for example:

That’s easily one of the coolest workarounds I’ve seen :slight_smile: I can live with that, at least for now.

I’m hit by this error as well, but maybe for a different reason. It seems like HTTPS is the problem for me (using Node’s built-in HTTPS):