When loading an existing DuckDB file in NodeJS, getting:
Error: IO Error: Corrupt database file: computed checksum 2810343048822349045 does not match stored checksum 11515148827668975023 in block
at rt.runQuery (/REDACTED/node_modules/.pnpm/@duckdb+duckdb-wasm@1.28.1-dev173.0/node_modules/@duckdb/duckdb-wasm/dist/duckdb-node-eh.worker.cjs:80:80188)
The issue seems to be on writing the DB. Can't load the DB from duckdb cli binary either.
To Reproduce
I'm running duckdb-wasm from within node because I couldn't get duckdb-node to build for an alpine docker container. My goal is to update an existing DuckDB file.
What happens?
When loading an existing DuckDB file in NodeJS, getting:
The issue seems to be on writing the DB. Can't load the DB from duckdb cli binary either.
To Reproduce
I'm running duckdb-wasm from within node because I couldn't get duckdb-node to build for an alpine docker container. My goal is to update an existing DuckDB file.
Similar goal to https://github.com/duckdb/duckdb-wasm/issues/1119, but hitting this error.
Create db1:
create_db1.js
:node create_db1.js
then try to load db1 as db2 and make some changes
db1_to_db2.js
:node db1_to_db2.js
IMPORTANT:
it works if I remove the
PRIMARY KEY
constraint.Browser/Environment:
NodeJS v20.11.1
Device:
Macbook M3 Pro
DuckDB-Wasm Version:
1.28.1-dev173.0
DuckDB-Wasm Deployment:
from npm
Full Name:
Mark Halonen
Affiliation:
gosteelhead.com