Repository navigation
feat(vite-plugin-ngp): link each error and warning to its troubleshooting entry - #172
Merged
Merged
Conversation
ChristopherPHolder
force-pushed
the
docs/troubleshooting
branch
from
December 4, 2026 04:41
cd67e48 to
8be7d6c
Compare
…rnings
One page, grouped by where you meet a message, with each heading the message as printed or a
symptom, then what it means, why, what to do, and the page with the detail. It covers the plugin's
own messages, about 19 of which the docs never mentioned, and the failure modes spread over
Status, Nx, Creating an app, Compatibility, Configuration and Testing, each linking back. It ends
with how to make a minimal reproduction and file a bug. Configuration's table of startup errors
moved here, leaving a pointer.
The markdown renderer takes `### Heading {#id}` as the heading's id, so a link from outside the
site keeps working when the heading is reworded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ting entry Every message with an entry on the Troubleshooting page ends with a second line, See https://push-based.github.io/vite-plugin-ngp/troubleshooting/#<anchor>, from seeTroubleshooting(). pnpm docs:check finds every call in the plugin's source and fails when the page has no heading with that id, and when a page names one id twice. Left without a link: the Angular CLI's fileReplacements message and @angular/localize's missing translations, quoted word for word, and the native-engine and checker-exit messages, which open pull requests #149 and #138 rewrite. Decision 88 records the choice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#169 replaced configuration#when-to-change-them with a heading per option while this branch was open; link engine, hmr and cache to their own headings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ChristopherPHolder
force-pushed
the
docs/troubleshooting
branch
from
December 4, 2026 18:56
8be7d6c to
c7c3f52
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #152
What changed
A Troubleshooting page (
site/content/troubleshooting.md). It's grouped the way Vite's troubleshooting page is: installing, when Vite starts, dev server, HMR, builds, type-checking, server rendering, i18n, Vitest and ngp-generate. Each entry's heading is the exact message, or its stable prefix, or a symptom when there's no message. Under it: what the message means, why it happens, what to do, and a link to the page with the detail. The page ends with how to make a minimal reproduction (an app fromnpm create @push-based/ngp@latest) and how to file a bug.Messages link to their entry.
src/troubleshooting.tsaddsseeTroubleshooting(anchor). 30 call sites now end with\nSee https://push-based.github.io/vite-plugin-ngp/troubleshooting/#<anchor>. Each source edit stays on the lines it changes, plus one import line per file.Named anchors. Each heading is written
### Message {#anchor}, andsite/scripts/markdown.tsuses the{#anchor}part as the heading's id. An installed version of the plugin keeps linking the same id after the heading is reworded; an id made from the heading text wouldn't survive that.Check.
pnpm docs:check(run in CI) finds everyseeTroubleshooting('...')call in the plugin's source. It fails when the page has no heading with that id, when the argument isn't a string literal, or when a page uses the same{#id}twice. Decision 88 and a row in design.md record the approach. There's a changelog line under 4 December → Docs.Inventory of messages
engine/typeChecker/test.extendedDiagnostics/cache.dir/workspaceRootmust be … (index.ts)#invalid-optioncache.dir is …, which holds Vite's root(index.ts)#cache-dir-holds-rootno tsconfig found in …(index.ts)#no-tsconfigssr.server is …, and … does not exist(index.ts)#ssr-server-missingi18n with @angular/ssr is not supported yet(index.ts)#i18n-with-angular-ssrtest.externalLibraries needs pool …(index.ts)#external-libraries-poolHMR update for … failed, reloading×2, incl.changed on disk, and the watcher never reported it(index.ts)#hmr-update-failed(was undocumented)HMR failed for …. Reloading.(index.ts)#hmr-failed(was undocumented)NG4003–NG4005option diagnostics (compiler.ts)#angular-compiler-options(was undocumented)The … path in file replacements does not exist.(index.ts)#file-replacement-missing, no link: the Angular CLI's own textno ngp build found(ngp-api.ts)#no-ngp-build… not found. Build ngp with …(ngp-api.ts)#toolchain-file-missing(was undocumented)has no native ngp engine for …(ngp-api.ts)#no-native-engine, no link yet: #149 rewrites those linesFailed to link … in …(linker.ts)#failed-to-link(was undocumented)… budgets exceeded: …(budgets.ts)#budgets-exceededtypeChecker: 'tsrs' needs the tsrs package(type-check.ts)#tsrs-not-installedtype-check failed: …(type-check.ts)#type-check-failed(was undocumented)tsgo/tsrs exited with code …(type-check.ts)#checker-exited, no link yet: next to #138's hunk (was undocumented)… doesn't export a reqHandler …(angular-ssr.ts)#no-req-handler(was undocumented)… index.html is missing: the browser build has to run before the server build(angular-ssr.ts)#browser-build-first(was undocumented)prerendering failed:+Angular rendered nothing for it(angular-ssr.ts, prerender-worker.ts)#prerendering-failed(was undocumented)devLocale '…' is neither …(i18n.ts)#unknown-dev-locale(was undocumented)… is not a translation file …(i18n.ts)#not-a-translation-file(was undocumented)… says it is for locale '…'.(i18n.ts)#translation-locale-mismatch(was undocumented)No Angular locale data for '…'(i18n.ts)#no-locale-data(was undocumented)[locale] No translation found …(i18n.ts, from @angular/localize)#missing-translation, no link: localize's text, printed once per messageunknown format(extract.ts),unknown --duplicates(extract-cli.ts)#extract-unknown-option(was undocumented)message extraction failed(extract.ts)#extraction-failed(was undocumented)Not overwriting …(generate.ts)#generate-not-overwriting, no link: the other ngp-generate messages already say what to changeNot on the page because they're internal and a user can't act on them:
invalid component stylesheet id,the ssr environment has no module runner,the prerender worker exited with code, the linker'sFatalLinkerErrors (users see them insideFailed to link), and the parse error in linker.ts/static-defer.ts.Corrections to the earlier draft, from checking the source:
emitDeclarationOnly) never reaches the plugin.new HybridCompiler()only checks the extendedDiagnostics options, so that bullet is gone.The bug-report link points at
issues/new?template=bug_report.md. That template arrives with #165. Until #165 merges, the link opens a blank issue.How I checked it
pnpm docs:checkpasses and counts 30 linked messages. I changed one anchor to a bad id to make sure the check fails, then put it back.pnpm site:buildpasses.{#id}doesn't appear in the rendered HTML; it does stay in the raw.mdandllms-full.txtcopies, where it's harmless.pnpm build, then 10 affected plugin test files (engine-option, linker, i18n, output-cache, workspace, build-options, external-libraries, angular-ssr, type-check, toolchain): 69/69 pass.engine-option.test.mjschecks the exact message text, so it now expects the link line.site/dist/clientunder/vite-plugin-ngp/and looked at the page at 1280 px in light and at 390 px in dark. The anchor links land on the right entry, and there's no horizontal scroll on a phone.Follow-ups
Once #149 and #138 merge, add the link to the native-engine and checker-exit messages, and update the Windows wording in
#no-native-engine.🤖 Generated with Claude Code