"chakra-cli tokens" command fails
See original GitHub issueDescription
Trying to run the chakra-cli tokens
command fails with error: TypeError: Cannot read properties of undefined (reading 'message')
.
Link to Reproduction
https://github.com/kculmback/chakra-bug
Steps to reproduce
- Download reproduction repo
- Run
npm install
- Run
npm run gen:theme-typings
- See error:
TypeError: Cannot read properties of undefined (reading 'message')
at yx (node_modules/prettier/parser-typescript.js:13:3304348)
at Object.parse (node_modules/prettier/parser-typescript.js:13:3304817)
at Object.parse$d [as parse] (node_modules/prettier/index.js:12975:19)
at coreFormat (node_modules/prettier/index.js:14525:16)
at formatWithCursor$1 (node_modules/prettier/index.js:14765:14)
at node_modules/prettier/index.js:60959:14
at Object.format (node_modules/prettier/index.js:60979:12)
at node_modules/@chakra-ui/cli/src/utils/format-with-prettier.ts:8:19
at async run (node_modules/@chakra-ui/cli/src/scripts/read-theme-file.worker.ts:113:20)
Chakra UI Version
1.7.3
Browser
No response
Operating System
- macOS
- Windows
- Linux
Additional Information
Chakra v1.7.3 Chakra CLI v1.6.0 Node v16.13.1
Repo was made using Vite; used npm init vite@latest
and selected react-ts
. Added Chakra and Chakra CLI, theme file, and command to generate theme typings.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:32 (12 by maintainers)
Top Results From Across the Web
CLI - Chakra UI
The Chakra UI CLI can be used to generate typings for your custom theme tokens, like colors, semantic tokens, component variants, etc. The...
Read more >@chakra-ui/cli - npm
Start using @chakra-ui/cli in your project by running `npm i @chakra-ui/cli`. There are 7 other projects in the npm registry using ...
Read more >@blocto/blocto-chakra-theme - NPM Package Overview - Socket
Start using Socket to analyze @blocto/blocto-chakra-theme and its 0 dependencies to secure ... yarn add @chakra-ui/styled-system npx @chakra-ui/cli tokens ...
Read more >Making a front-end for your Solana dApp with Chakra UI
Create beautiful front-ends for Solana dApps using the Chakra UI library ... minting tokens or NFTs - however a decentralized app is incomplete...
Read more >Command Line Interface | RedwoodJS Docs
Compares the list of files in api/db/dataMigrations to the records in the DataMigration table in the database and executes any files not present....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I pushed a fix for this which works on my machine (yay) with this project: https://github.com/kculmback/chakra-bug
You can try this version by installing this version of
@chakra-ui/cli
in yourpackage.json
:Let me know if there are still issues in your project.
I downgraded the prettier and it works thank you @OnielN14!