-
Notifications
You must be signed in to change notification settings - Fork 585
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
Realm not working with Bunjs #6168
Comments
@ansarizafar Realm doesn't support Bun yet. The error message you see is cause by the fact that Bun doesn't run the post-install script. To support Bun is not a trivial project. It includes:
I will leave the issue open, and please upvote the issue if you believe Bun support is important for you. |
Bun is an important Javascript runtime which is faster than both Node and Deno. Realm must add support for Bun. I badly need it for our next project. |
Bun implements napi, so a lot of the work is already done for you We do not implement libuv symbols yet, and it looks like Realm is using libuv symbols when used with Node.js If your target is >= C++17, you could probably get away with using std::filesystem instead |
Thank you @Jarred-Sumner for pointing out that Bun is using N-API. Our dependency on |
Is there any new update? I badly need this. |
the realm eng team does not intend to work on adding support for Bun at this time. Of course, Realm is open-source so you are more than free to take a swing at implementing it yourself. And we are happy to accept PRs back from our community. |
How frequently does the bug occur?
Always
Description
When I try to import realm in a js file and run the script with Bunjs, I get the following error
error: Cannot find module "realm/realm-constants.json" from "/home/zafaransari/projects/bun/realmdb/node_modules/realm/dist/bundle.node.js"
Stacktrace & log output
Can you reproduce the bug?
Always
Reproduction Steps
install realm using command
bun add realm
import realm in a js file
Run the js file with the command
bun run index,js
Version
12.2.0
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Ubuntu 22.04.3 LTS
Build environment
Which debugger for React Native: ..
Cocoapods version
No response
The text was updated successfully, but these errors were encountered: