D
Deno

help

DuckDB deno package broken & npm package segfaulting

Ccsjh9/3/2023
Has anyone had any luck using DuckDB with Deno? I've tried with the npm package with segfaults on a basic test query, and with the denoland package with fails on initialization (which is especially unfortunate because it was made by one of the deno maintainers? oh well).
Ddivy9/4/2023
the one on /x should work. What’s the initialisation error?
Ccsjh9/4/2023
my bad, query error not initialization but it's
error: Uncaught (in promise) TypeError: Cannot convert object to primitive value
const view = new Deno.UnsafePointerView(BigInt(v));
^
at BigInt (<anonymous>)
at toArrayBuffer (https://deno.land/x/duckdb@0.1.1/lib.js:7:43)
at Module.query (https://deno.land/x/duckdb@0.1.1/lib.js:530:7)
at Connection.query (https://deno.land/x/duckdb@0.1.1/mod.ts:38:16)
at file:///Users/csjh/Test/duckdb-querying/main.ts:8:24
at eventLoopTick (ext:core/01_core.js:183:11)
error: Uncaught (in promise) TypeError: Cannot convert object to primitive value
const view = new Deno.UnsafePointerView(BigInt(v));
^
at BigInt (<anonymous>)
at toArrayBuffer (https://deno.land/x/duckdb@0.1.1/lib.js:7:43)
at Module.query (https://deno.land/x/duckdb@0.1.1/lib.js:530:7)
at Connection.query (https://deno.land/x/duckdb@0.1.1/mod.ts:38:16)
at file:///Users/csjh/Test/duckdb-querying/main.ts:8:24
at eventLoopTick (ext:core/01_core.js:183:11)
repro:
import { open } from "https://deno.land/x/duckdb@0.1.1/mod.ts";

const db = open(":memory:");


const connection = db.connect();

connection.query('select 1');
import { open } from "https://deno.land/x/duckdb@0.1.1/mod.ts";

const db = open(":memory:");


const connection = db.connect();

connection.query('select 1');
ran w/ deno run --allow-all --unstable main.ts appears there's a PR open on the repo as well
Ddivy9/4/2023
oh ok, will land it
Ccsjh9/4/2023
thanks 🙂

Looking for more? Join the community!

Recommended Posts
Get Deno working with ESLintHi! I'm trying out a Deno project and I want to get Deno TS Typing working with ESLint. I understanInstall issueI am triyng to instal Deno but i always get this error and I cant solve it. Help pls!LSP: Uncached or missing @types/node when importing node:processI'd like to understand better what's going on here in case it's a potential bug in node interop: ```Deno vs Node for writing a React component library.Hi all. I love Deno and what it does, but I need some help deciding if it is right for my small projrun code at the start of every hourI would like the most performant code pls.Denoflare scheduled workersCloudflare has a cronjob feature for running workers at a scheduled time. Wrangler has a flag wranglHow to make a function whose return type is inferred to be the same as an input function'sThis is what I got so far. ```ts type Context = { abc: string, def: boolean } /* HAVE TO Tfresh.gen.ts blankhey folks. I've been using fresh for a while as a hobbist. Recently started a new project using thCan extension state have fields that require passing lifetime?It is possible to pass bounds and parameters to the extension! macro but as far as I see it doesn't Limits for background tasksI was thinking of making a filter page for users of multible game cdns, like steam, epic games, and Compiled binary from Cross-Platform CLI example will not workGoing through https://deno.com/blog/build-cross-platform-cli and running the output file, I get ```SDeno Vite App CLI doesn't match Deploy DocsI hope this is the right channel for this. (Deno team is probably already aware of this, but posting