@rdub/duckdb
v0.5.0
Published
DuckDB+Node.js utilities
Readme
@rdub/duckdb
DuckDB+Node.js utilities
API
- db.ts:
Dbclass (implemented with duckdb-async, falling back to duckdb-lambda-x86; see duckdb-node#15) - duckdb.ts:
initDuckDb,runQuery
Examples
iRe/www (interactive reports for Jupyter notebooks):

Use with Next.js
Inspired by next.js#46493 / node.bcrypt.js#979, you probably want this Webpack config in order to access duckdb-lambda-x86 from a Next.js app:
/** @type {import('next').NextConfig} */
const nextConfig = {
…,
+ webpack: (config) => {
+ config.externals = [...config.externals, 'duckdb', 'duckdb-lambda-x86'];
+ return config;
+ },
};
module.exports = nextConfig;Otherwise you'll see errors like:
./node_modules/.pnpm/@[email protected]/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html Module parse failed: Unexpected token (1:0)