Skip to content

Guides

When something breaks

Start with npx verbaly doctor. It inspects the whole setup and prints the exact fix next to each finding, so most of this page is what it would have told you.

The verbaly command is not found

The command lives in @verbaly/compiler. The plugins depend on it, but a package manager only links a command for a package you installed yourself, so a plugin bringing it along is not enough. Add it to your dev dependencies:

pnpm add -D @verbaly/compiler

A language appeared that I never asked for

If you do not list locales, every JSON file in your catalogs directory counts as a language, so one left behind by an earlier run becomes one too, and the build then asks for its translations. List your languages and the list is complete:

locales: ['es', 'en']  // now a stray pt.json is ignored

wrap reported files it did not write

A file where t is not available is listed and left untouched, because wrapping text there would stop your project compiling. The report says how many texts wait in each file and whether it is a client component, so you know which line to add. Add it and run it again.

The build says a translation is broken

Not missing, broken: the translation is there and cannot render what the source renders. It lost a {value}, dropped a plural case or changed a tag. Run npx verbaly check for the exact reason per message. failOnMissing: false does not silence these on purpose, because they render wrong.

A key is showing on screen instead of the text

A message that resolves nowhere renders as its own key. Usually the catalog for that language has not arrived yet, or the group is one you excluded from the browser with bundle.exclude and something asks for it at runtime. The build warns about the second case by name.

My keys are not typed, or the types are stale

The types are generated from your source catalog by extract, so they are as old as your last run. If your editor cannot see them at all, check that the generated file is inside your tsconfig, or point dts somewhere it is.

t cannot be imported from verbaly

No package exports t. It comes from your project's own module, virtual:verbaly, or from your framework's hook. doctor reports this one as an error because no bundler can resolve it.

to moveEnterto open
Copied to clipboard