Ultimate

X_NEW_ERROR_CODE_INVALID

Means

bun run new-error-code was called without what it needs, or for a package with no errors.ts

Typical cause

a code, --package, --title, --cause and --fix are all required, because the registration needs the title and the wiki row needs the cause and the fix — and a --cause that repeats --title is refused. Or packages/<pkg>/src/errors.ts does not exist

Fix

bun run scripts/new-error-code.ts X_PKG_WHAT_FAILED --package <pkg> --title '<one line>' --cause '<what usually makes it happen>' --fix '<command or edit>'. For an unknown package, bun run workspaces:list lists the directories

Listed under CLI and verify

This page as markdown