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

Support V8 C++ APIs for "nan" addons and other packages to work #4290

Open
16 tasks
xHyroM opened this issue Aug 24, 2023 · 37 comments
Open
16 tasks

Support V8 C++ APIs for "nan" addons and other packages to work #4290

xHyroM opened this issue Aug 24, 2023 · 37 comments
Labels
tracking An umbrella issue for tracking big features

Comments

@xHyroM
Copy link
Collaborator

xHyroM commented Aug 24, 2023

Affected packages

  • better-sqlite3
  • node-canvas
  • midi
  • libxmljs
  • bignum
  • zeromq
  • node-libcurl
  • bson-ext
  • heapdump
  • @datadog/native-metrics
  • tiny-secp256k1
  • tree-sitter-c-sharp
  • chacha-native
  • @sentry/profiling-node
  • pdfjs-dist
  • gl

What version of Bun is running?

0.8.0+ad326b77342dd3d8585a30b7da803d32f9c11fe2

What platform is your computer?

Linux 6.4.10-artix1-1 x86_64 unknown

What steps can reproduce the bug?

import Database from 'better-sqlite3';
const db = new Database('foobar.db', {});

console.log(db.prepare("CREATE TABLE TEST").run());

What is the expected behavior?

Run as normally

What do you see instead?

/usr/bin/bun: symbol lookup error: /home/hyro/Workspace/booo/node_modules/better-sqlite3/build/Release/better_sqlite3.node: undefined symbol: node_module_register

Additional information

Related thread: 1144181146809270332
Message: https://discord.com/channels/876711213126520882/1144181146809270332/1144184224006557747

All versions are affected

@xHyroM xHyroM added the bug Something isn't working label Aug 24, 2023
@floydjones1
Copy link

This also happens for node-libcurl

@xHyroM xHyroM changed the title better-sqlite3 doesn't work, missing node_module_register multiple modules doesn't work, missing node_module_register Aug 24, 2023
@xHyroM xHyroM changed the title multiple modules doesn't work, missing node_module_register multiple modules don't work, missing node_module_register Aug 24, 2023
@xHyroM xHyroM changed the title multiple modules don't work, missing node_module_register node_module_register is not implemented Aug 25, 2023
@xHyroM xHyroM changed the title node_module_register is not implemented node_module_register is not implemented (better_sqlite3) Aug 25, 2023
@robobun robobun added sqlite Something to do with bun:sqlite napi Compatibility with the native layer of Node.js and removed sqlite Something to do with bun:sqlite napi Compatibility with the native layer of Node.js labels Sep 10, 2023
@issadarkthing
Copy link

I also encounter this error

@Zykatious
Copy link

this also happens for bson-ext

@autoscatto
Copy link

also for heapdump

@vroudge
Copy link

vroudge commented Sep 15, 2023

same for @datadog/native-metrics

@uditdc
Copy link

uditdc commented Sep 16, 2023

Likewise for tiny-secp256k1

@ozyman42
Copy link

Also for cdktf-cli #5306

@Electroid Electroid added the napi Compatibility with the native layer of Node.js label Sep 24, 2023
@obedm503
Copy link

Also happens with tree-sitter-c-sharp

@Scitz0
Copy link

Scitz0 commented Sep 28, 2023

Same error for chacha-native

@metawrap-dev
Copy link

same for node-canvas

@4i8
Copy link

4i8 commented Oct 28, 2023

bun: symbol lookup error: /root/rut/node_modules/canvas/build/Release/canvas.node: undefined symbol: node_module_register
same for canvas

@edi9999
Copy link

edi9999 commented Oct 28, 2023

Same for libxmljs

@floydjones1
Copy link

floydjones1 commented Nov 13, 2023

How can we get a little more attention to this. This is holding me back from using bun in production. 😢
node-libcurl

bun: symbol lookup error: /home/.../node_modules/node-libcurl/lib/binding/node_libcurl.node: undefined symbol: node_module_register

@M-Gonzalo
Copy link

bun: symbol lookup error: /root/rut/node_modules/canvas/build/Release/canvas.node: undefined symbol: node_module_register same for canvas

me too

@frani
Copy link

frani commented Nov 26, 2023

similar error:

bun: symbol lookup error: /usr/src/app/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-x64-glibc-115.node: undefined symbol: _ZN2v87Isolate10GetCurrentEv

@xbura1han
Copy link

xbura1han commented Nov 27, 2023

Also happening for Sentry & bcrypt
Sentry code:
Code:

const Sentry = require('@sentry/bun');
const { ProfilingIntegration } = require("@sentry/profiling-node")

Error:

bun: symbol lookup error: /root/projects/userBackend/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-x64-glibc-115.node: undefined symbol: _ZN2v87Isolate10GetCurrentEv

@bonald
Copy link

bonald commented Mar 29, 2024

node_libcurl.node: undefined symbol: node_module_register
wen node-libcurl

andymatuschak added a commit to andymatuschak/orbit that referenced this issue Apr 5, 2024
 is fixed, because better-sqlite3 doesn't work with bun
@deadblue22
Copy link

bun: symbol lookup error: .../node_modules/gl/build/Release/webgl.node: undefined symbol: node_module_register

@ellis
Copy link

ellis commented Apr 20, 2024

Trying to use @testcontainers/postgresql also leads to the node_module_register error

@ibilux
Copy link

ibilux commented May 1, 2024

Same in pdfjs-dist (related to canvas).

@terrablue
Copy link

This blocks using node-gtk in combination with bun build --compile to produce standalone GTK apps.

@celso-alexandre
Copy link

celso-alexandre commented May 7, 2024

Trying to use pcsclite also leads to the node_module_register error

@jimying
Copy link

jimying commented May 9, 2024

Also node-pty , Release/pty.node: undefined symbol: node_module_register

@ralyodio
Copy link

I also need this for my project.

@Electroid Electroid removed bug Something isn't working node.js Compatibility with Node.js APIs labels May 14, 2024
@Electroid Electroid changed the title Implement enough of the public V8 C++ API for "nan" addons and other packages to work Support V8 C++ APIs for "nan" addons and other packages to work May 14, 2024
@arthurwolf
Copy link

I also get this error with the opencv bindings:

bun: symbol lookup error: /home/arthur/dev/ai/manga/node_modules/opencv4nodejs/build/Release/opencv4nodejs.node: undefined symbol: node_module_register

what is the status on this, is there anything I can do to get it to run ?

@826327700
Copy link

I also encountered this problem. This question has been raised for a long time. Is there still no solution?

@Jarred-Sumner
Copy link
Collaborator

This question has been raised for a long time. Is there still no solution?

The solution is we need to hire more engineers because there's too much to do

We are hiring in San Francisco

@826327700
Copy link

这个问题提了好久了,还是没有解决办法吗?

解决方案是我们需要雇佣更多的工程师,因为有太多事情要做

我们正在旧金山招聘

Sorry, I can't help with this, but I think we should pay attention to bun's compatibility with npm dependency packages generated by c++ static link libraries, otherwise bun will be difficult to apply to production projects. I also sincerely hope that bun can be liked and used by more people.

@M-Gonzalo
Copy link

This question has been raised for a long time. Is there still no solution?

The solution is we need to hire more engineers because there's too much to do

We are hiring in San Francisco

I'm sure you've already considered this, but hiring remote workers would allow you to find talent from all around the world. Not many people can (or want to) move to SF...

@arthurwolf
Copy link

arthurwolf commented May 28, 2024 via email

@Wamy-Dev
Copy link

Im interested, but my portfolio isnt wide enough in terms of the langs they use...

@maietta
Copy link

maietta commented May 29, 2024

This question has been raised for a long time. Is there still no solution?

The solution is we need to hire more engineers because there's too much to do

We are hiring in San Francisco

If I didn't hate on SF, I'd be applying in a heartbeat.

@timbrinded
Copy link

Whilst i understand the staffing issues, not having access to testcontainerspackage is a non-go for my monorepos.

With heavy heart will be moving back to pnpm until this issue is closed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracking An umbrella issue for tracking big features
Projects
None yet
Development

No branches or pull requests