denodrivers / sqlite3

The fastest and correct SQLite3 module for Deno runtime
https://jsr.io/@db/sqlite
Apache License 2.0
265 stars 22 forks source link

Error: Failed to load SQLite3 Dynamic Library #114

Closed DavidPesta closed 12 months ago

DavidPesta commented 1 year ago

On Ubuntu 22.04. The same thing happens for both 0.8.0 and also 0.10.0:

$ deno run --allow-all sqlite3.ts
Downloading https://github.com/denodrivers/sqlite3/releases/download/0.10.0/libsqlite3.so
error: Uncaught (in promise) Error: Failed to load SQLite3 Dynamic Library
  throw new Error("Failed to load SQLite3 Dynamic Library", { cause: e });
        ^
    at https://deno.land/x/sqlite3@0.10.0/src/ffi.ts:631:9
    at eventLoopTick (ext:core/01_core.js:178:11)
Caused by: TypeError: Deno.dlopen is not a function
    at dlopen (https://deno.land/x/plug@1.0.1/mod.ts:155:15)
    at eventLoopTick (ext:core/01_core.js:178:11)
    at async https://deno.land/x/sqlite3@0.10.0/src/ffi.ts:614:7
DavidPesta commented 1 year ago
$ deno --version
deno 1.38.3 (release, x86_64-unknown-linux-gnu)
v8 12.0.267.1
typescript 5.2.2

Same thing also happens after I upgrade to deno 1.38.4.

DjDeveloperr commented 12 months ago

Can you try using —unstable flag? It’s needed for FFI, and place it before the file name in run command.

DavidPesta commented 12 months ago

That works. I forgot about that in the Usage section. :sweat_smile: