question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SyntaxError: Undefined label 'e' (@chakra-ui/cli)

See original GitHub issue

Description

When I run chakra-cli tokens src/styles/theme.ts, I get the error SyntaxError: Undefined label 'e'

Link to Reproduction

https://github.com/nick-kang/chakra-ui-cli-bug-01

Steps to reproduce

  1. clone repo
  2. run yarn to install packages
  3. run yarn build:chakra to build tokens
  4. see error

Chakra UI Version

2.0.0

Browser

Google Chrome 101

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

This is the log output when I run chakra-cli tokens

 Chakra UI CLI  v2.0.0 by Chakra UI
Generate theme typings for autocomplete


✖ An error occurred
SyntaxError: Undefined label 'e'

pacakges:

{
  "dependencies": {
    "@chakra-ui/pro-theme": "^0.0.49",
    "@chakra-ui/react": "2.0.2",
    "@emotion/react": "^11",
    "@emotion/styled": "^11",
    "framer-motion": "^6",
    "pino": "^7.11.0",
    "react": "18",
    "react-dom": "18"
  },
  "devDependencies": {
    "@chakra-ui/cli": "^2.0.0",
    "@types/react": "18.0.9",
    "@types/react-relay": "^13.0.2",
    "prettier": "^2.4.1",
    "typescript": "4.6.4"
  }
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
TimKolbergercommented, May 26, 2022

I ran into this issue as well in one of my projects. Setting the baseUrl in tsconfig.json solved it for me.

Nevertheless the CLI error handling needs some love.

0reactions
segunadebayocommented, Jun 6, 2022

This has been fixed in a recent PR. We’ll release an update shortly.

If the issue persists after upgrading, I’ll re-open it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript: weird syntax error when using "label"
SyntaxError : Undefined label 'abc'. If I remove the line of var i=0;. Then it's OK. This is weird to me. Does javascript...
Read more >
Why my code is giving uncaught syntax error- undefined label ...
I labelled a loop recurs.. recurs: loop I am trying to break this loop using break keyword when a certain condition is satisfied.....but...
Read more >
label - JavaScript - MDN Web Docs
The labeled statement can be used with break or continue statements. It is prefixing a statement with an identifier which you can refer...
Read more >
The JavaScript Label Statement - Code Planet - WordPress.com
The JavaScript label statement is used in conjunction with continue ... This will generate an error // "SyntaxError: Undefined label 'foo' ...
Read more >
Undefined label 'undefined' - Solved - CodeCombat Discourse
http://i.imgur.com/2oMN0UN.png Code was working then I edited one area and it said this error on Line 73, which I think was just something...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found