Open quantuminformation opened 1 year ago
Even if deno would run npm packages, like bindings, correctly, I doubt that it can load native modules compiled for NodeJS.
I doubt that it can load native modules compiled for NodeJS.
Apparently it can https://github.com/denoland/deno/issues/18444 https://github.com/denoland/deno/issues/15717
But this is not a better-sqlite3 issue, it's on Deno to make it compatible if they want that.
It doesn't work win Bun 1.0 either. Same error here:
ERROR: Could not locate the bindings file. Tried:
Which prebuilt binary did you download? Also note that Bun still does not support the full Node API which may lead to issues anyway support overview.
We are moving to bun 1.0, it appears to work
It doesn't work win Bun 1.0 either.
bun has a native sqlite adapter. this project is cited as it’s inspiration
You can use .node (Node-API modules) in both Deno and Bun, but you cannot do bun build --compile
or deno compile
with them. So that just means not building or compiling your code and just running the .ts
file in production.
I have tried this on both Deno and Bun with my napi-rs
created npm
library that exports typed functions from a .node file.
if i try to put the .node dynamic lib from: https://github.com/WiseLibs/better-sqlite3/releases/download/v9.4.3/better-sqlite3-v9.4.3-node-v108-win32-x64.tar.gz in: \AppData\Local\deno\npm\registry.npmjs.org\bindings\1.5.0\lib\binding\node-v108-win32-x64\better_sqlite3.node i get this error: TypeError: LoadLibraryExW failed
Dependency walker on better_sqlite3.node shows an unresolved dependency "node.exe" Could be related to not loading node-api at runtime in better_sqlite3.node? something like said here: https://github.com/neon-bindings/neon/issues/584 which will also avoid to have separate better_sqlite3.node binary releases for electron and node?
Or for some reason node-gyp win_delay_load_hook Is disabled? https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules
I solved it by installing better-sqlite3
in Dockerfile
instead of package.json
& using pnpm
's supportedArchitectures
feature.
Tried to use with deno