Skip to content

fix: identify failing prerender input generators - #17105

Closed
akasakariko wants to merge 1 commit into
sveltejs:version-3from
akasakariko:fix-prerender-inputs-error
Closed

akasakariko wants to merge 1 commit into
sveltejs:version-3from
akasakariko:fix-prerender-inputs-error

Conversation

@akasakariko

Copy link
Copy Markdown
Contributor

Fixes #16756.

When a remote prerender inputs callback fails during a build, the error now names the export and its source module and preserves the original message and cause. This makes the reported missing-request-store error traceable to the user's inputs callback.

The context is added at the actual postbuild call, using the existing remote module file metadata. Tests cover synchronous and asynchronous failures, aliased exports, and repeated registration without rewriting the inputs callback.

Validation: 20 build-error tests pass; the complete Kit unit suite has 784 passed and 110 skipped. Format, lint, full workspace check, generated types, and the normal async test app production build passed. The full Playwright matrix was not run locally.


Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 2dcd247:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/2dcd247d950246df76cd2a57f95e7a2a68938095

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/17105

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Sep 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2dcd247

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rich-Harris

Copy link
Copy Markdown
Member

Thank you but this isn't right — the problem isn't the lack of ceremony around the error, it's the fact that the error is occurring at all. Though we do need to fix the stack trace when inputs() fails. Will open a separate PR for that

elliott-with-the-longest-name-on-github pushed a commit that referenced this pull request Sep 15, 2026
…rerender inputs (#17113)

Small fix for a bug identified in #17105. No test because adding a test
for this would be quite expensive, and it's a minor QoL thing that is
unlikely to regress
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.

Attempting to use a constant prerender remote function in the inputs for another causes confusing internal error

2 participants