bondsandbarrels
bondsandbarrels•3d ago

Deno, Sveltekit and adapter node build issue (+DuckDB)

Wondering if this is a SvelteKit/Rollup or Deno or DuckDB-WASM issue. My build errors due to missing "node:" specifiers. If I add those manually (i.e. go into the build files and add node: specifiers) it all works. Is this an issue with SvelteKit, with Deno or with DuckDB? Screenshot is the unadjusted build.
No description
2 Replies
HeyItsFinn
HeyItsFinn•19h ago
Specify those imports as from the node library like this:
// deno.json

{
"imports": {
"url": "node:url",
"vm": "node:vm",
"worker_threads": "node:worker_threads"
// etc...
}
}
// deno.json

{
"imports": {
"url": "node:url",
"vm": "node:vm",
"worker_threads": "node:worker_threads"
// etc...
}
}
@bondsandbarrels
bondsandbarrels
bondsandbarrelsOP•4h ago
Afraid this didn't work.. I added a deno.json to the root of the project, put the imports block in there, removed previous build folder and rebuild. The result is the same. Oh wait! You mean after building, just run it with
deno run -A ./build/index.js
deno run -A ./build/index.js
? Because that seems to work! The irony that in order to make a SIMPLER runtime work I have to ADD another config file 😬 . But all good, Deno team is doing amazing things.

Did you find this page helpful?