Skip to content

Allow binderhub-client to run in Node.js #2111

@choldgraf

Description

@choldgraf

The @jupyterhub/binderhub-client package can only run in a browser, not in node.
This makes it hard to drive a BinderHub from outside the browser, for example from a command-line tool or a CI job.

The problem is @microsoft/fetch-event-source, which is browser-only (and doesn't seem to be maintained anymore, the last release was like 5 years ago).
The client uses it to stream build logs from the BinderHub /build endpoint, so the package fails when imported in a node runtime.

Why this would be useful

We're working on a command-line interface to manage BinderHub sessions over here: https://github.com/2i2c-org/clinder in collaboration with Project Pythia. We'd like to request Binder sessions for notebook execution as part of a CI/CD pipeline, and this improvement would let us do this!

Implementation

We already have a vendored+modified version of binderhub with this fix working over here:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions