Commit 5bc6139
committed
fix(npm): add Node.js >= 22 version guard to npm bundle
Users installing via pnpm (or npm/yarn without strict engine enforcement)
on Node.js < 22 got a cryptic `ERR_UNKNOWN_BUILTIN_MODULE: node:sqlite`
crash at startup because the bun:sqlite polyfill depends on the `node:sqlite`
built-in which only exists in Node.js 22+.
Add a version check to the esbuild bundle banner so it runs before any
require() calls. On Node < 22 users now see a clear error with install
instructions for the standalone binary instead of a V8 internals crash.1 parent 233fa6c commit 5bc6139
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
0 commit comments