cdxgen icon indicating copy to clipboard operation
cdxgen copied to clipboard

[deno] sqlite3 doesn't work

Open prabhu opened this issue 1 year ago • 5 comments

We probably need to use the runtime-specific SQLite libraries based on Deno and Bun!

error: Uncaught (in promise) Error: Could not locate the bindings file. Tried:
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/build/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/build/Debug/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/build/Release/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/out/Debug/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/Debug/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/out/Release/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/Release/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/build/default/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/compiled/18.17.1/linux/x64/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/addon-build/release/install-root/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/addon-build/debug/install-root/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/addon-build/default/install-root/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/lib/binding/node-v108-linux-x64/node_sqlite3.node
    at bindings (file:///mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (file:///mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/sqlite3/lib/sqlite3-binding.js:1:291)
    at Object.<anonymous> (file:///mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/sqlite3/lib/sqlite3-binding.js:3:4)
    at Module._compile (node:module:732:34)
    at Object.Module._extensions..js (node:module:746:10)
    at Module.load (node:module:657:32)
    at Function.Module._load (node:module:538:12)
    at Module.require (node:module:676:19)
    at require (node:module:790:16)
    at Object.<anonymous> (file:///mnt/work/CycloneDX/cdxgen/node_modules/.deno/[email protected]/node_modules/sqlite3/lib/sqlite3.js:2:17)

prabhu avatar Jan 27 '24 14:01 prabhu

sequelize doesn't work either. https://github.com/sequelize/sequelize/issues/12836

prabhu avatar Jan 27 '24 14:01 prabhu

With sqlite3 there are WASM alternatives that may simplify cross-platform issues: https://www.npmjs.com/package/node-sqlite3-wasm

jdalton avatar May 31 '24 16:05 jdalton

Thanks @jdalton. This project definitely is interesting. Will you be interested in sharing a PR to switch to this package?

prabhu avatar May 31 '24 17:05 prabhu

@prabhu Yes, I'm up for attempting it!

jdalton avatar Jun 03 '24 15:06 jdalton

@jdalton please wait for this PR to get merged.

prabhu avatar Jun 03 '24 20:06 prabhu