@sapphire/type does not work with Bun
Hello! I was trying to get my Sapphire application up and running on my server, however I was greeted with this error:
Here's my
package.json
file:
... and my Dockerfile
:
Not sure what I'm doing wrong here. I'd appreciate any help. Thanks!Solution:Jump to solution
Adding to this, @sapphire/type doesn't use Node.js' internals, it uses
v8.h
(see source code). Because Bun is built on JavaScriptCore (JSC) and not V8, we can't make the internal inspecting part available for Bun even with a Rust rewrite.6 Replies
@sapphire/type uses NodeJS internals so yeah that makes sense. Not much we can do about it unless someone were to rewrite it to a language like Rust. (prs welcome)
someone called?
yeah when will you
I have the energy for tonight, so- I'll see what I can do in a bit
This will be much more complicated than I previously thought cause Aura and I discussed it, she apparently had a bit of a tough roadblock that I can try to figure out but it will certainly not be an easy task :kek:
Solution
Adding to this, @sapphire/type doesn't use Node.js' internals, it uses
v8.h
(see source code). Because Bun is built on JavaScriptCore (JSC) and not V8, we can't make the internal inspecting part available for Bun even with a Rust rewrite.@Chloe mentioning you just in case so you're aware of the response. :)