Open zx8086 opened 10 months ago
Possibly related to #4959
@Electroid How would i be able to verify? The trustedDependancies approach doesn't work.
@Electroid Maybe I can reach out to couchbase ?
This is very likely a bug in Bun, not couchbase. We will fix it.
Same happening with libxmljs. The library needs to run compilation scripts so it's added to trustedDependencies
, however, after installation, when running any file with bun /path/to/file.ts
that imports and uses libxmljs
, I get:
dyld[<process number>]: missing symbol called
[1] <process number> killed bun ./bin/file.ts
Runs fine on ts-node
Same happening with libxmljs. The library needs to run compilation scripts so it's added to
trustedDependencies
, however, after installation, when running any file withbun /path/to/file.ts
that imports and useslibxmljs
, I get:dyld[<process number>]: missing symbol called [1] <process number> killed bun ./bin/file.ts
Runs fine on
ts-node
Yeah along the same lines
Any progress / ETA on this ? Been wanting to use Bun for some projects but at this point if this is abandoned, would like to know
Seeing the same thing when trying to use robotjs after getting it to build by installing node-gyp
and adding robotjs
to the trustedDependencies
Same thing happens in bun 1.0.18 on macos arm64 if I do require('@sap/hana-client')
. The package was installed with pnpm and comes with prebuilt binaries (no postinstall step).
SAP and Couchbase are two enterprise solution together with OpenTelemetry that we use in our corporation. This to me makes Bun not production ready.
If my understanding is correct, it is not the specific compatibility with CouchBase, SAP or libxmljs that has to be looked into, but rather that these packages rely on some modules for which Bun does not yet offer compatibility.
They must be yellow or red modules of this list.
We need to find a quick way to determine which of these modules is the culprit. Maybe we will find out the underlying issue is all about the same module for all of the above mentioned packages, so we can ask to prioritise its implementation for next releases. I would love to help myself for the implementation of these but my Zig skills are not yet up to speed for it.
SAP and Couchbase are two enterprise solution together with OpenTelemetry that we use in our corporation.
For telemetry we're using dynatrace
like most SAP products, it used to crash at import when bun
1.0.0 was launched, now it's no longer crashing (at least at import, haven't tried anything more than that). But yeah, as an alternative, support for any other OpenTelemetry-compatible framework would be great to have.
For @sap/hana-client
, there is a pure-JS client called hdb
, but it's quite buggy with certain data types even on nodejs, so the NAPI client would be great to have.
BTW, on Linux x64 the error is more explicit (using bun@1.0.19
):
TypeError: <repo>/node_modules/.pnpm/@sap+hana-client@2.19.20/node_modules/@sap/hana-client/prebuilt/linuxx86_64-gcc6/hana-client.node: undefined symbol: uv_mutex_lock
@Electroid @Jarred-Sumner
Any timelines for when this will be looked into or completed, it seems every other NPM compatibility issue is being looked into and resolved, even when logged after this.
This same issue seems to happen when importing any version of pdfjs-dist
. Which is the prebuilt version of this.
Issue also arrising with node-snap7
Waiting for this to ditch node... this and http2 for gRPC
@Electroid @Jarred-Sumner
We were excited for Bun, eagerly anticipating starting new projects with Bun, which means delaying or holding development to really give us time to implement & test before fully committing.
Would help to know if this is feasible & timelines or just to abandon this endeavour. Do you need any help ?
the same with subset-iconfont
package
import { MiProvider } from 'subset-iconfont';
const mdi = new MiProvider(['shopping-cart', "shopping-cart-checkout", "delete"], {
formats: ['woff2'],
generateMinCss: false,
generateCssMap: false,
writeOutFiles: ['web', 'webfonts',"metadata"]
});
mdi.makeFonts('./outputDir').then((result) => {
console.log('Done!');
});
new discovery: This error can also occur in ssh2
import 'ssh2'
console.log('ssh2')
// const ssh2 = new Client()
// ssh2.on('ready', () => {
// console.log('Client :: ready')
// ssh2.end()
// })
$ bun run test.ts
dyld[7636]: missing symbol called
Same in tree-sitter
Same with ora.
dyld[24639]: missing symbol called
[1] 24639 killed bun run src/Onboard.ts
Same with Konva;
missing symbol called can mean any missing symbol, but the uv_mutex_t
apis (mentioned at one point in this thread) should not be hard to implement (bun does not use libuv on posix platforms)
@Electroid @Jarred-Sumner @paperdave Thanks for the insight, got it working and now testing... hopefully should be able to close this.
Running brew install --HEAD libuv Removing bun.lock & node_modules Bun Update (with couchbase still in trusted dependencies)
Got a Post install message
Same on node-ssh
This same issue seems to happen when importing any version of
pdfjs-dist
. Which is the prebuilt version of this.
Check https://github.com/oven-sh/bun/issues/6608#issuecomment-2008316410, solved it by doing some manual module overriding shenanigans
Figure out the needed dependancies required for postinstall
Running brew install --HEAD libuv Removing bun.lock & node_modules Bun Update (with couchbase still in trusted dependencies)
While that is a workaround, we do want to have a proper fix.
frida same
the proposed workaround didn't work for me with Bun v1.1.8 on Linux or Mac. trying to use zeromq library
bun: symbol lookup error: /node_modules/zeromq/prebuilds/linux-x64/node.napi.glibc.node: undefined symbol: uv_async_init
I can't wait until this is fixed 🤞 - It's the last blocker for my ditching Node + Express + Socket.io
the proposed workaround didn't work for me with Bun v1.1.8 on Linux or Mac.
@jviel Didn't work for me either.
Have the same problem with ssh2. I installed it, pushed it to my test server without local testing, worked. Then some hours later I wanted to run my local test setup on my Mac, got this error. Is the only solution to remove it from my project even if my code is already working on the server, just so I can continue developing locally?
Same here. Trying to use ssh2 but I get the above error.
1.1.25 workds. just run bun upgrade
What version of Bun is running?
1.0.6
What platform is your computer?
Darwin 22.5.0 arm64 arm
What steps can reproduce the bug?
Install Couchbase Server / Couchbase Capella Cloud -> docker run -t --name db -p 8091-8096:8091-8096 -p 11210-11211:11210-11211 couchbase/server:enterprise-7.2.0 or https://cloud.couchbase.com/ Install Couchbase SDK -> bun add couchbase@4.2.7 Run Bun -> bun index.js
index.js
Reference: https://docs.couchbase.com/nodejs-sdk/current/hello-world/start-using-sdk.html
What is the expected behavior?
Runs and connects to a Couchbase Instance
What do you see instead?
bun add couchbase@4.2.5
bun add couchbase@4.2.7
npm i couchbase couchbase@4.2.7
Additional information
No response