oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.35k stars 2.78k forks source link

`http2-wrapper` package breaks on `linux/amd64` #15308

Open devunt opened 1 day ago

devunt commented 1 day ago

What version of Bun is running?

oven/bun:1.1.36

What platform is your computer?

Docker

What steps can reproduce the bug?

http2-wrapper package breaks on Bun v1.1.35 onwards.

If I downgrade the image tag to oven/bun:1.1.34 it works well.

A weird thing is: Bun v1.1.36 in darwin/arm64 works well, but it only breaks in the docker (which is a linux/arm64).

EDIT: It also breaks in alpine image, too.

What is the expected behavior?

Code builds well.

What do you see instead?

|   "../../node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/js-stream-socket.js"(exports2, module2) {
|     "use strict";
|     init_cjs_shims();
|     var stream2 = require("stream");
|     var tls = require("tls");
|     var JSStreamSocket = new tls.TLSSocket(new stream2.PassThrough())._handle._parentWrap.constructor;
                                                                              ^
TypeError: null is not an object (evaluating 'new tls.TLSSocket(new stream2.PassThrough)._handle._parentWrap')

Additional information

No response

ayZagen commented 20 hours ago

can't upgrade bun because if this regression.

nathan-maybrey commented 20 hours ago

Just ran into this bug myself too. Bun 1.1.34 works fine, newer versions cause the issue.