Skip to content

fix: import nitro helpers from nitropack/runtime - #55

Merged
farnabaz merged 1 commit into
mainfrom
fix/nitro-runtime-imports
Oct 20, 2026
Merged

farnabaz merged 1 commit into
mainfrom
fix/nitro-runtime-imports

Conversation

@benjamincanac

Copy link
Copy Markdown
Contributor

Since Nuxt 4.6.2, apps with compatibilityVersion: 5 fail to build with this module:

"useRuntimeConfig" is not exported by "virtual:#imports", imported by "nuxt-llms/dist/runtime/server/routes/llms.txt.get.js"

nuxt/nuxt#36548 now drops the nitro presets from #imports when experimental.nitroAutoImports is off, which is the default with compat v5. This PR imports useRuntimeConfig and useNitroApp from nitropack/runtime instead, which also makes the @ts-expect-error comments unnecessary.

I checked it against the Nuxt UI docs on Nuxt 4.6.2. Nuxt 5 will need these to move to nuxt/server or nitro/* later.

@pkg-pr-new

pkg-pr-new Bot commented Oct 20, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/nuxt-llms@55

commit: 973afcc

@farnabaz farnabaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@farnabaz
farnabaz merged commit 0a6868f into main Oct 20, 2026
2 checks passed
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.

3 participants