oven-sh / bun

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

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

Open xHyroM opened 9 months ago

xHyroM commented 9 months ago

Affected packages

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

floydjones1 commented 9 months ago

This also happens for node-libcurl

issadarkthing commented 8 months ago

I also encounter this error

Zykatious commented 8 months ago

this also happens for bson-ext

autoscatto commented 8 months ago

also for heapdump

vroudge commented 8 months ago

same for @datadog/native-metrics

uditdc commented 8 months ago

Likewise for tiny-secp256k1

ozyman42 commented 8 months ago

Also for cdktf-cli #5306

obedm503 commented 8 months ago

Also happens with tree-sitter-c-sharp

Scitz0 commented 8 months ago

Same error for chacha-native

metawrap-dev commented 7 months ago

same for node-canvas

4i8 commented 7 months ago

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

edi9999 commented 7 months ago

Same for libxmljs

floydjones1 commented 6 months ago

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

bun: symbol lookup error: /home/.../node_modules/node-libcurl/lib/binding/node_libcurl.node: undefined symbol: node_module_register
M-Gonzalo commented 6 months ago

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

me too

frani commented 6 months ago

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 commented 6 months ago

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
movy commented 6 months ago

Same for https://github.com/TulipCharts/tulipnode

bun: symbol lookup error: node_modules/tulind/lib/binding/Release/node-v115-linux-x64/tulind.node: undefined symbol: node_module_register
Jarred-Sumner commented 6 months ago

node_module_register uses & expects V8 C++ APIs. Bun uses JavaScriptCore, an entirely different JavaScript engine. This is especially challenging for Bun to support, but not without precedent. node-jsc did it.

Wamy-Dev commented 2 months ago

Same with New Relic

Arilith commented 2 months ago

Same for https://github.com/zeromq/zeromq.js

bun: symbol lookup error: node_modules/zeromq/prebuilds/linux-x64/node.napi.glibc.node: undefined symbol: uv_async_init

bonald commented 2 months ago

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

deadblue22 commented 1 month ago

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

ellis commented 1 month ago

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

ibilux commented 1 month ago

Same in pdfjs-dist (related to canvas).

terrablue commented 4 weeks ago

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

celso-alexandre commented 3 weeks ago

Trying to use pcsclite also leads to the node_module_register error

jimying commented 3 weeks ago

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

ralyodio commented 3 weeks ago

I also need this for my project.

arthurwolf commented 6 days ago

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 commented 6 days ago

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

Jarred-Sumner commented 6 days ago

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 commented 5 days ago

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

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

我们正在旧金山招聘

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 commented 5 days ago

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 commented 5 days ago

I would expect this specific issue (and others like it?) have a huge cost/benefit ratio in terms of bringing new users to bun. it's the only thing at the moment blocking me from using bun for everything...

solve this, and many more will be able to use bun, meaning more eyes on bun, meaning more ease hiring...

On Tue, May 28, 2024 at 4:54 PM Gonzalo Muñoz @.***> wrote:

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 https://apply.workable.com/oven/j/A7A1388873/ 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...

— Reply to this email directly, view it on GitHub https://github.com/oven-sh/bun/issues/4290#issuecomment-2135436843, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2SFKJPCILBWEVZBLJRJTZESLC5AVCNFSM6AAAAAA34UURSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZVGQZTMOBUGM . You are receiving this because you commented.Message ID: @.***>

--

勇気とユーモア

Wamy-Dev commented 4 days ago

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

maietta commented 4 days ago

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 commented 2 days ago

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!