Skip to content

fix(db): skip tsconfig resolution during schema build#785

Merged
RihanArfan merged 1 commit intonuxt-hub:mainfrom
onmax:fix/db-schema-tsconfig-prepare
Jan 19, 2026
Merged

fix(db): skip tsconfig resolution during schema build#785
RihanArfan merged 1 commit intonuxt-hub:mainfrom
onmax:fix/db-schema-tsconfig-prepare

Conversation

@onmax
Copy link
Copy Markdown
Contributor

@onmax onmax commented Jan 16, 2026

Follow-up to #758

Problem

First nuxi prepare fails on fresh project when .nuxt/ doesn't exist.

[UNHANDLEABLE_ERROR] Error: Tsconfig not found .nuxt/tsconfig.json
Caused by: Failed to resolve tsconfig option

PR #758 enabled schema building during prepare, but rolldown tries to resolve the project's tsconfig.json which extends .nuxt/tsconfig.json - a file that doesn't exist yet.

Fix

Add tsconfig: false at the top level of tsdown build options. This prevents rolldown from resolving the tsconfig chain while still generating .d.mts types.

StackBlitz

Link
Bug nuxthub-758
Fix nuxthub-758-fixed

CLI Reproduction

git clone --depth 1 --filter=blob:none --sparse https://github.com/onmax/repros.git
cd repros && git sparse-checkout set nuxthub-758
cd nuxthub-758 && pnpm i && pnpm prepare  # fails

Verify fix

git sparse-checkout add nuxthub-758-fixed
cd ../nuxthub-758-fixed && pnpm i && pnpm prepare  # succeeds
ls .nuxt/hub/db/  # schema.mjs + schema.d.mts exist

Prevents rolldown from resolving project tsconfig.json which may
extend .nuxt/tsconfig.json that doesn't exist during first prepare.
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 16, 2026

@onmax is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Jan 16, 2026

npm i https://pkg.pr.new/@nuxthub/core@785

commit: ac1053c

@onmax onmax marked this pull request as ready for review January 16, 2026 19:29
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nuxthub Ready Ready Preview Jan 19, 2026 3:14pm

@RihanArfan RihanArfan merged commit 289b279 into nuxt-hub:main Jan 19, 2026
9 checks passed
@onmax onmax deleted the fix/db-schema-tsconfig-prepare branch January 19, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants