Bundle asset file in nextjs
Open
@ijjk is already working on this.
Since Mar 5, 2026.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 365
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 169
Description
I'm trying to "bundle" a little sqlite db with my app, but it fails in the build step with the Workflow SDK.
const SQLITE_URL = new URL("db.sqlite", import.meta.url);
// at runtime use it...
Nextjs turbopack seems to be OK with it. I see .next/server/assets/db.e8730435.sqlite on disk when I disable the workflow sdk.
> env-production next build --turbo
Discovering workflow directives 2926ms
Created steps bundle 600ms
Created intermediate workflow bundle 13ms
Creating webhook route
Creating manifest...
Created manifest with 27 steps, 24 workflows, and 0 classes 3ms
▲ Next.js 16.2.0-canary.73 (Turbopack)
- Cache Components enabled
- Experiments (use with caution):
· staleTimes
Creating an optimized production build ...
> Build error occurred
Error: Turbopack build failed with 1 errors:
./apps/web/app/.well-known/workflow/v1/step/route.js:112603:22
Module not found: Can't resolve 'db.sqlite'
112602 | import path2 from "node:path";
> 112603 | var SQLITE_URL = new URL("db.sqlite", import.meta.url);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.