The new engine reports every problem with a diagnostic code. Codes are stable: search for a code here or in Troubleshooting, and use it in bug reports. The legacy builders don't use codes.
Format
Entry point
Format
Example
Vite plugin
[CODE] message (file:line)
[CONTENT_LINK] … (docs/guide/index.md:12)
ng-doc command
[severity] CODE: message
[error] OUTPUT_UNOWNED_COLLISION: Refusing to overwrite unowned output …
A page, category, API or configuration file doesn't compile.
DISCOVERY_UNSUPPORTED_DEFAULT_EXPORT
error
An entity file must default-export a named variable with an object literal.
DISCOVERY_INVALID_ENTRY
error
A page, category or API file has no title, or its onlyForTags isn't a string or an array of strings.
DISCOVERY_TAGS_INVALID
error
The Vite plugin's or the API's generator.discovery.tags aren't an array of non-empty strings (Pages and categories [Build tags]). The ng-doc command checks its --tags before the build instead.
DISCOVERY_CATEGORY_SOURCE_MISSING
error
A page imports a category from outside the documentation folder.
DISCOVERY_CATEGORY_CYCLE
error
Categories are nested in a loop.
DISCOVERY_KEYWORD_LOADER_FAILED
error
A keyword loader failed.
DISCOVERY_KEYWORD_INVALID
warning
An entry of keywords.keywords has no url. It is left out.
DISCOVERY_EVALUATION_FAILED
error
Running an entity or configuration file failed, or a Markdown template failed to render, for example a Nunjucks syntax error or a missing include (Troubleshooting [DISCOVERY_EVALUATION_FAILED]).
DISCOVERY_SOURCE_OUTSIDE_WORKSPACE
error
A page, category or API file resolves outside the workspace, for example through a symbolic link.
The source file of a playground's target doesn't exist.
CONTENT_ACTION
error
A template calls an action that doesn't exist.
KEYWORD_DUPLICATE
warning
Two sources define the same keyword. The last one wins. Define the keyword in keywords.keywords to choose its target without this warning.
KEYWORD_PIN_UNRESOLVED
warning
A keywords.keywords route replaces a loader's link, but no page or API declaration of the build has that route.
Output
Code
Severity
Meaning
OUTPUT_UNOWNED_COLLISION
error
The output folder has files that NgDoc didn't write, often from the legacy builders or another tool writing the same folder. Delete the folder and restart, or give the other writer its own folder (Troubleshooting [OUTPUT_UNOWNED_COLLISION]).
A Shiki theme other than the built-in ones has no entry in themeModules.
NGDOC_VITE_ANGULAR_COMPATIBILITY
The Angular plugins don't come from createNgDocAngularPlugins.
NGDOC_VITE_ANGULAR_OPTIONS
createNgDocAngularPlugins got an unsupported option value.
NGDOC_VITE_ANGULAR_MODE
The plugins run in test mode (NODE_ENV=test or VITEST).
NGDOC_VITE_ANGULAR_BUILD
createNgDocAngularPlugins was loaded from source instead of the built @ng-doc/builder package.
NGDOC_VITE_ANGULAR_COMPOSITION
The Angular plugin array was changed: it must contain exactly the plugins that createNgDocAngularPlugins returns.
NGDOC_VITE_ANGULAR_PROBE
angularComponentProbe can't be read, or Angular didn't compile it. Point it to a component that the application always compiles.
NGDOC_VITE_UNRESOLVED_IMPORT
Vite can't resolve an import in development; the message names it. Check the tsconfig paths, or add a Vite resolve.alias.
NGDOC_VITE_APPLICATION_OPTION
createNgDocApplicationPlugin got an option of an angular.json build target. The message names its Vite or Analog equivalent.
NGDOC_VITE_SERVER_ENTRY
The server bundle or prerendering was requested, but createNgDocApplicationPlugin has no server entry.
NGDOC_VITE_OPTION_REMOVED
The plugin got maxContentRequests, which was removed with the virtual content mode. Remove the option.
NGDOC_DEVELOPMENT_CONTENT_REMOVED
generator.developmentContent: 'virtual' was removed. Remove the option.
Prerendering
Code
Meaning
NGDOC_PRERENDER_FAILED
One or more routes failed to render. The message lists the first ten with their errors.
NGDOC_PRERENDER_TIMEOUT
A route took longer than routeTimeout (--route-timeout).
NGDOC_PRERENDER_ROUTE
A route in routes (--routes) doesn't start with /, or has a ?, a #, or a . or .. segment.
NGDOC_PRERENDER_SERVER_ENTRY
The server bundle doesn't export what prerendering needs. Build it from the server entry of the plugin.
Other codes
The remaining codes report internal failures of the engine, such as a compiler worker that crashed (WORKER_CRASH) or timed out (WORKER_COMPILE_TIMEOUT). If one of them repeats, follow Troubleshooting [Worker crashes and timeouts] and report it with the full message.