Skip to content

Troubleshooting

does not provide an export named 'transformWithOxc'

Section titled “does not provide an export named 'transformWithOxc'”

You are on Vite 6 or 7. @hozo/vite (and @hozo/storybook, which wraps it) needs Vite 8 or newer. See Vite.

Android on React Native 0.87: stale text, buttons that stop responding

Section titled “Android on React Native 0.87: stale text, buttons that stop responding”

Logcat says Unable to find viewState for tag N. This is not Hozo’s bug: React Native 0.87 resolves androidx.collection 1.4.0–1.4.2, which can lose entries. Pin androidx.collection:collection:1.4.4. See Metro.

A box lays its children out in a column, not a row

Section titled “A box lays its children out in a column, not a row”

className="flex" does not make a row. Hozo’s boxes follow React Native, where the direction is column. Write flex-row. The compiler warns with FLEX_DIRECTION_UNSAID. See A box is a column.

On React Native, hover:, active: or disabled: do nothing through cn()

Section titled “On React Native, hover:, active: or disabled: do nothing through cn()”

A project helper named in a className is followed to its file and read when it wraps clsx, classnames, cx or twMerge (including shadcn/ui’s cn). A merge compiles only when the build verifies the rules of the resolved merger and all possible class tokens are known and supported. A caller’s opaque className keeps the whole merge at runtime. Check that the class appears in the project candidate map and that the component supplies the required state. For example, Pressable supplies its own hover state to the resolver. A helper behind an alias the bundler cannot resolve also falls back unless declared with classHelpers. Custom extendTailwindMerge / createTailwindMerge configurations stay at runtime; a declaration does not prove their conflict rules. See How styles are resolved.

A class name built at runtime has no style

Section titled “A class name built at runtime has no style”

`bg-${color}-500` is not written in any source file, so the build never sees it and emits no rule. Write the full class names somewhere the build can read them, for example in an object that maps each colour to its class.

On React Native, a development build warns once about each class it is handed at run time and cannot find in the project’s map: `bg-foo-500` is not in this app's class map. A name that is meant to mark an element rather than style it, such as js-row, is not a missing class. List those in markerClasses, as exact names or as prefixes ending in *:

js
withHozo(config, { markerClasses: ['card-title', 'js-*'] })

Tailwind’s own group and peer never need listing.

Run the audit over the whole project and read its findings, each with a file, a line and a code:

sh
npx @hozo/cli dry-fit . --format json

See Reading what the compiler says. If that does not explain it, open an issue.