CycloneDX / cdxgen

Creates CycloneDX Bill of Materials (BOM) for your projects from source and container images. Supports many languages and package managers. Integrate in your CI/CD pipeline with automatic submission to Dependency Track server. Google chat: https://chat.google.com/room/AAAA6l2dO60?cls=7
https://cyclonedx.github.io/cdxgen/
Apache License 2.0
577 stars 156 forks source link

[deno] sqlite3 doesn't work #834

Open prabhu opened 9 months ago

prabhu commented 9 months ago

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/bindings@1.5.0/node_modules/bindings/build/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/build/Debug/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/build/Release/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/out/Debug/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/Debug/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/out/Release/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/Release/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/build/default/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/compiled/18.17.1/linux/x64/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/addon-build/release/install-root/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/addon-build/debug/install-root/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/addon-build/default/install-root/node_sqlite3.node
 → /mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/lib/binding/node-v108-linux-x64/node_sqlite3.node
    at bindings (file:///mnt/work/CycloneDX/cdxgen/node_modules/.deno/bindings@1.5.0/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (file:///mnt/work/CycloneDX/cdxgen/node_modules/.deno/sqlite3@5.1.7/node_modules/sqlite3/lib/sqlite3-binding.js:1:291)
    at Object.<anonymous> (file:///mnt/work/CycloneDX/cdxgen/node_modules/.deno/sqlite3@5.1.7/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/sqlite3@5.1.7/node_modules/sqlite3/lib/sqlite3.js:2:17)
prabhu commented 9 months ago

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

jdalton commented 5 months ago

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

prabhu commented 5 months ago

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

jdalton commented 5 months ago

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

prabhu commented 5 months ago

@jdalton please wait for this PR to get merged.