bun icon indicating copy to clipboard operation
bun copied to clipboard

Implement support for `http2` module

Open jgunzelman88 opened this issue 3 years ago • 9 comments

Version

0.1.5

Platform

Darwin ip-192-168-1-189.us-east-2.compute.internal 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64

What steps will reproduce the bug?

Don't know if this is just a module that hasn't been added yet but I am trying to use the GCP datastore apk and I got

error: Could not resolve: "http2". Maybe you need to "bun install"?

I did bun add http2 and this was resolved but then I get

error: Cannot find module "./framer" from "bun:wrap"

How often does it reproduce? Is there a required condition?

https://github.com/poketrax/pokepull/tree/v1.0.0

bun ./src/pokepull.ts

Or install the gcp datastore apk bun install @google-cloud/datastore instantiate a Datastore object.

What is the expected behavior?

Module should resolve.

What do you see instead?

error: Cannot find module "./framer" from "bun:wrap"

Additional information

Let me know if this is something I need to submit to GCP or if I did something stupid

jgunzelman88 avatar Jul 26 '22 22:07 jgunzelman88

Same behavior happening here but my issue is with GRPC from etcd3.

thiagozanetti avatar Aug 02 '22 14:08 thiagozanetti

So bug is gone now in 0.1.7 but now i get a segmentation fault :/

jgunzelman88 avatar Aug 07 '22 00:08 jgunzelman88

its a seg fault at 0 so probably a null pointer error but i'm no zig expert. SegmentationFault at 0x0000000000000000

jgunzelman88 avatar Aug 07 '22 00:08 jgunzelman88

same issue with "firebase-admin". http2 not found, when I "bun add" it, I get "error: Cannot find module "./framer" from "bun:wrap"

bun v0.1.9

imadbz avatar Aug 19 '22 01:08 imadbz

I am now getting "error: Cannot find module "./framer" from "bun:wrap" again

bun v0.1.10

jgunzelman88 avatar Aug 19 '22 12:08 jgunzelman88

error: Cannot find module "./framer" from "bun:wrap" v0.1.10

irdevp avatar Aug 25 '22 14:08 irdevp

We do not support the Node.js http2 module yet, but are tracking support for it.

Electroid avatar Nov 03 '22 00:11 Electroid

I just discovered bun and got hit with this on the very first script I tried to run 😦

The script talks to firebase services so uses grpc so requires http2. Back to ts-node for now 🤷

evelant avatar Feb 03 '23 01:02 evelant

Same here: gRPC and gRPC-web is getting traction in new projects, firebase in particular, and bun is grand for new projects. Also this hits with a segmentation fault which takes time to diagnose to this issue..

AndreaCuneo avatar Feb 19 '23 09:02 AndreaCuneo

Looks like @aws-sdk/client-s3 is also blocked by this. For S3 I can probably just replace with something fetch-based, but could be more problematic for other aws services.

lewisl9029 avatar Mar 16 '23 02:03 lewisl9029

I am getting http2 error for googleapis

Error: Cannot find package "http2" from "/home/royaltsp/tsp/node/google-drive-files/google-drive-demo/node_modules/googleapis-common/build/src/http2.js"

Code: https://github.com/tsp1998/google-drive-demo

tsp1998 avatar Mar 18 '23 17:03 tsp1998

kind of a big blocker for adoption. I literally can't solve my problem using bun so now I need to rewrite for deno or node.js which is a massive drag.

NyanHelsing avatar Apr 24 '23 00:04 NyanHelsing

Massive block for me

t3ntxcl3s avatar May 07 '23 08:05 t3ntxcl3s

Yeah me too firebase does not work due to this

VrindavanSanap avatar Jun 27 '23 11:06 VrindavanSanap

Still issue in 0.7.1 - @Jarred-Sumner will this be in the 1.0 release?

birkskyum avatar Aug 03 '23 21:08 birkskyum

v1.0.0 - getting this error while starting a gRPC server. It's the blocker for me. I hope it gets released with v1.1.0.

prosenjitjoy avatar Sep 01 '23 09:09 prosenjitjoy

v1.0.0 still an issue.

c0dification avatar Sep 08 '23 16:09 c0dification

This is at the top of our feature list, @cirospaciari has already started work on this.

Electroid avatar Sep 08 '23 16:09 Electroid

Would love to see this, as I love bun, but also need to use the AWS SDK. Cheers to all those working hard on bun!

nostrascott avatar Sep 08 '23 17:09 nostrascott

bun is amazing and extremely valuable to the community, thank you. However, reading the following from Bun v1 announcement was hard w/o a smile given @aws-sdk/* and many other packages depending on this issue don't work.

While perfect compatibility with Node.js isn't possible — looking at you node:v8 — Bun can run virtually any Node.js application in the wild.

o-alexandrov avatar Sep 08 '23 18:09 o-alexandrov

I really hope to be able to use bun, but I'm stuck with gRPC. Is there a place where I can see the progress of this feature's support?

x1957 avatar Sep 09 '23 09:09 x1957

@x1957 , this is that place. As mentioned above, work is already started on this.

birkskyum avatar Sep 09 '23 10:09 birkskyum

v1.0 released with this issue? Big bunmer.

vsly-ru avatar Sep 10 '23 02:09 vsly-ru

Hope to see this in bun sooner!

tsp1998 avatar Sep 10 '23 04:09 tsp1998

Please address this issue

RahulDey12 avatar Sep 10 '23 08:09 RahulDey12

Proto buffers are super common nowadays and every lib is taking advantage of http2 on their implementations. Not having support to http2 will block any project that is integrating with Google’s infrastructure as they all rely on proto buffers. Please prioritize adding http2 support to unblock migration from GCP consumers. I’m looking forward to use Bun, as soon as I can migrate my micro-servers that all internally also communicate using proto buffers / gRPC.

gartz avatar Sep 10 '23 16:09 gartz

👍 +1

I am using a wrapped/fixed copy of the long-abandoned spdy, similar to many others. Though bun has been fantastic for package management, building, and test-running for CI. I can't use it as a runtime for the application itself due to this issue.

naterkane avatar Sep 10 '23 19:09 naterkane

Deno's native HTTP/2 support documented at https://deno.land/[email protected]/runtime/http_server_apis#http2-support-1

moderation avatar Sep 10 '23 21:09 moderation

Will we see HTTP/2 released in v1.0.4?

vrn-dev avatar Oct 02 '23 06:10 vrn-dev

@vrn-dev , there was a mention two weeks ago, that it was expected in a week or two, so it might be close.

birkskyum avatar Oct 05 '23 12:10 birkskyum