@chakra-ui/cli typegen custom outPath results in missing relative paths
Author: haxxxtonCreated Nov 17, 2025Updated Sep 11, 2026
Labelsstale
Description
When running @chakra-ui/cli typegen ./path-to-theme.ts --outdir ./some/local/path chakra correctly outputs 5 .gen.d.ts files (conditions, prop-types, recipes, system, token).
However,
prop-types.gen.d.tsfile attempts to still importimport type { CssProperties } from "../css.types"recipes.gen.d.tsfile attempts to still importimport type { RecipeDefinition, SlotRecipeDefinition, SystemRecipeFn, SystemSlotRecipeFn } from "../recipe.types" import type { ConditionalValue } from "../css.types"system.gen.d.tsfile attempts to still importimport type { ConditionalValue, CssProperties } from "../css.types"
These relative links dont exist relative to the --outdir. While it could be updated to import these types from @chakra-ui/react, however, the type CssProperties is not currently exported.
This also likely gets difficult as some files inside styled-system appear to rely upon the content of the generated folder. Which likely breaks any use of custom outdir
Link to Reproduction
https://stackblitz.com/edit/chakra-ui-v3-3xqhsu72?file=src%2Fcustom-theme.ts,package.json
Steps to reproduce
- Go to Reproduction Link
2a. Either run
npm run chakra:typegento generate types locally; OR 2b. Open prop-types, recipes, or system generated types - Observe relative links
Chakra UI Version
^3.28.1
Browser
No response
Operating System
- macOS
- Windows
- Linux
Additional Information
No response
Source: chakra-ui/chakra-ui