Skip to content
Back to the playbook

Diagnosing a Bun panic loading a native addon

Bunrevision 1

Diagnostic tree

  1. In progressBun panics loading a native addon after a version upgradeBun's support for native (.node) Node-API addons is not a complete implementation of Node's N-API/ABI surface, and what it does implement has changed across releases — so a module that happened to work on one Bun version can regress on a later one without any change to your own code or the addon.
View the whole map (5 more steps)
  • Does the exact same code work under plain Node.js instead of Bun?
  • This isn't Bun-specific
  • Is there a documented compatible pairing of module version and Bun version?
  • Fix: pin to the documented compatible pairing
  • Root cause: unresolved Bun/native-addon incompatibility

What to test

Bun panics loading a native addon after a version upgrade

Bun's support for native (.node) Node-API addons is not a complete implementation of Node's N-API/ABI surface, and what it does implement has changed across releases — so a module that happened to work on one Bun version can regress on a later one without any change to your own code or the addon.

What happened?