Skip to Content
Neshel-UI
CLI

Exit codes and diagnostics

Every exit code and diagnostic code of the neshel CLI, with causes and fixes.

Exit codes

CodeMeaning
0Success (warnings may be printed); also "unchanged"
1Invalid configuration: structural or colour errors (including config output/types), contrast errors under error
2Usage: unknown command or option, missing value, rejected --out/--types path
3Configuration not found, ambiguous, failed to load, or default export not an object
4generate --check: an output is missing or out of date
5I/O or unexpected internal error (stack trace with --debug)

Diagnostic format

<severity> <path> <code> <message>
error   themes.dark.colors.primary   unsupported-color-syntax  Expected #hex, rgb(), hsl() or oklch(); received "navy".

path is the dotted configuration path (empty for the file itself).

Codes

CodeSeverityCause and fix
unknown-keyerrorA key that the schema does not define; the message suggests the closest key
invalid-typeerrorWrong value type (for example a number where a string is expected)
invalid-versionerrorversion other than 1
invalid-theme-nameerrorTheme names must be lower-case kebab-case, 1–32 characters
reserved-themeerrorsystem cannot be configured as a theme
missing-baseerrorA named theme without extends
invalid-baseerrorextends other than "light" or "dark"
unexpected-baseerrorextends on light or dark
invalid-lengtherrorLengths must be 0 or a number with rem, em or px
invalid-font-stackerrorEmpty font names or names containing ;, { or }
invalid-outputerroroutput is not a .css path, is inside node_modules, is the config file or a directory
invalid-types-outputerrorSame rules for types (.d.ts)
invalid-metricserrorFont metrics missing required numeric fields
invalid-fallbackserrorFallback metrics without familyName or xWidthAvg
missing-metricswarningA customised font family without metrics; that role is not trimmed
unsupported-color-syntaxerrorNamed colours, var(), color-mix(), lab()… — use hex, rgb, hsl or oklch
invalid-colorerrorA colour that cannot be parsed (for example a malformed oklch()
alpha-not-allowederrorTransparency on a role other than border
out-of-gamutwarningOutside sRGB; contrast computed after gamut mapping, CSS keeps your value
contrastwarning/errorA pair below its minimum (4.5:1 text, 3:1 boundaries/focus)
reserved—Part of the code list but not emitted by this version (it marked keys reserved for a future release)
invalid-breakpoint-nameerrorNames must be lower camelCase
reserved-breakpoint-nameerrorbase, Neshel class prefixes or Tailwind variant names
duplicate-breakpoint-nameerrorNames must be unique ignoring case
breakpoint-redefinederrorextend mode cannot redefine sm, md, lg, xl or 2xl
invalid-breakpoint-widtherrorWidths must be positive rem values
duplicate-breakpoint-widtherrorTwo breakpoints with the same width (including defaults in extend mode)
too-many-breakpointserrorAt most 12 breakpoints
empty-breakpointserrorvalues is empty
breakpoint-orderwarningValues were not written in ascending order; output is sorted by width
no-component-packageswarningBreakpoints configured but no Neshel package with a style manifest installed

Common errors

  • Exit 3 "no configuration found" — run the command in the directory that contains neshel.config.ts, or pass --config.
  • Exit 3 when loading — a syntax error or an import that cannot be resolved from the configuration file's directory (install @neshel-ui/config next to the CLI).
  • Exit 4 in CI — commit the regenerated output or generate it in the build before the check.
Edit on GitHub

On this page