mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #749] Deploy fails with "No such module db" on 0.0.35+ (works on 0.0.33) #164
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#164
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @eduardornj on GitHub (Apr 2, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/749
Bug Description
Deploying to Cloudflare Workers fails with
No such module "db"on vinext 0.0.35 and later (tested up to 0.0.38). The same project deploys successfully on vinext 0.0.33.Error Message
This appears as a Workers validation error (error code 10021) after
wrangler deploysucceeds in uploading.Environment
Reproduction
Project structure
db/index.ts
tsconfig.json paths
worker-entry.ts (custom entry for cron + Durable Objects)
wrangler.jsonc
Steps to reproduce
db/directory using@/dbpath alias (Drizzle ORM + D1)worker-entry.tsthat imports from@/lib/cron(which transitively imports@/db)npx vinext buildsucceeds on all versionswrangler deploysucceeds on 0.0.33 but fails on 0.0.35+ with "No such module db"Workaround
Pin to vinext 0.0.33:
Analysis
The build step succeeds on all versions, so TypeScript compilation and bundling work fine. The error occurs at Workers runtime validation, suggesting the
@/dbpath alias is not being resolved correctly in the final Worker bundle starting from 0.0.35.This may be related to the "Major App Router runtime refactor" in 0.0.35 that extracted modules into smaller per-route bundles, or the tsconfig alias transform fixes mentioned in the changelog.
The custom
worker-entry.tswith"main": "./worker-entry.ts"in wrangler.jsonc may be a factor, as it creates a separate entry point that needs the same path resolution as the vinext-managed entry.@james-elicx commented on GitHub (Apr 2, 2026):
Are you able to share a git repository with the reproduction by any chance?
@eduardornj commented on GitHub (Apr 2, 2026):
Here's the minimal reproduction: https://github.com/eduardornj/vinext-repro-749
Key structure:
db/index.ts— exportsgetDb(), imported as@/dbvia tsconfig pathslib/cron.ts— imports from@/dbworker-entry.ts— custom entry ("main"in wrangler.jsonc) that imports@/lib/cron, which transitively imports@/dbTo reproduce:
Rolling back to
vinext@0.0.33and the same deploy succeeds. The build step passes on all versions — the error only appears at Workers runtime validation after upload.