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

Compatibility bug with compression package #3597

Closed
RobotoSkunk opened this issue Jul 10, 2023 · 1 comment · Fixed by #3609
Closed

Compatibility bug with compression package #3597

RobotoSkunk opened this issue Jul 10, 2023 · 1 comment · Fixed by #3609
Labels
bug Something isn't working node.js Compatibility with Node.js APIs

Comments

@RobotoSkunk
Copy link

RobotoSkunk commented Jul 10, 2023

What version of Bun is running?

0.6.13

What platform is your computer?

Linux 6.3.0-1-amd64 x86_64 unknown

What steps can reproduce the bug?

I've created an example repository to reproduce this bug.

  1. Clone the repository (https://github.com/RobotoSkunk/bun-express-bug).
  2. Execute it with bun (bun src/index.ts).
  3. Load the root endpoint (http://localhost:8080/).

What is the expected behavior?

The endpoint loading with the content being compressed by the package.

What do you see instead?

A TypeError with the message: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received type boolean (false).

Additional information

This happens both with TypeScript and compiled JavaScript output.

@RobotoSkunk RobotoSkunk added the bug Something isn't working label Jul 10, 2023
@RobotoSkunk
Copy link
Author

I've made an example repository: https://github.com/RobotoSkunk/bun-express-bug

@Electroid Electroid added the node.js Compatibility with Node.js APIs label Jul 10, 2023
dylan-conway added a commit that referenced this issue Jul 11, 2023
Jarred-Sumner pushed a commit that referenced this issue Jul 12, 2023
* fix #3597

* Update http.ts

* initialize to true
Jarred-Sumner pushed a commit that referenced this issue Jul 13, 2023
* fix #3597

* Update http.ts

* initialize to true
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

Successfully merging a pull request may close this issue.

2 participants