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

Support Got HTTP library #6427

Closed
robobun opened this issue Oct 11, 2023 · 1 comment
Closed

Support Got HTTP library #6427

robobun opened this issue Oct 11, 2023 · 1 comment
Labels
bug Something isn't working node.js Compatibility with Node.js APIs

Comments

@robobun
Copy link

robobun commented Oct 11, 2023

Context
Repo: https://github.com/sindresorhus/got
This is an HTTP request library for Node.js that it seems to be incompatible with bun, it works using Node.

Possible issue
Maybe Bun is not supporting all the features this lib is using, last time I checked this packages uses brotli compression and was also returning an error

How to reproduce

// got.ts

import got from "got";

async function execute() {
  const response = await got(
    "https://api.github.com/repos/sindresorhus/got/issues?state=open"
  ).json();

  console.log(response);
}

execute();

Using bun run ./got.ts returns the following error:

215 |                 Object.assign(this.options.headers, source.headers);
216 |             }
217 |         });
218 |         this.on('newListener', event => {
219 |             if (event === 'retry' && this.listenerCount('retry') > 0) {
220 |                 throw new Error('A retry listener has been attached already.');
                          ^
error: A retry listener has been attached already.

Originally reported on Discord: Support Got HTTP library

@robobun robobun added the bug Something isn't working label Oct 11, 2023
@Electroid Electroid added the node.js Compatibility with Node.js APIs label Oct 11, 2023
@Electroid
Copy link
Contributor

Duplicate of #3150

@Electroid Electroid marked this as a duplicate of #3150 Oct 11, 2023
@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working node.js Compatibility with Node.js APIs
Projects
None yet
Development

No branches or pull requests

2 participants