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.

chakra-cli command fails on next's 12

See original GitHub issue

Description

when using npx @chakra-ui/cli the command throws an error, also it’s not installing the executable script (using pnpm)

Link to Reproduction

none

Steps to reproduce

  1. npx @chakra-ui/cli tokens ...
  2. error appears Screen Shot 2022-06-15 at 15 58 59

Already installed loads/throttle on the current project, yet the error still happens

Chakra UI Version

2.2.1

Browser

No response

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

  • Using pnpm
  • Node v18.2

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
AlvaroAquijeDiazcommented, Jun 17, 2022

@TylerAPfledderer yea I hadn’t had issues like this before, and well everything is by default when used yarn create next-app, only the paths and the include values were changed. I’ll keep looking and see why it doesn’t work, but thanks anyway. 🚀

1reaction
suimongcommented, Jul 6, 2022

@TylerAPfledderer hi Tyler, I experienced similar issue to @AlvaroAquijeDiaz, but the symptom is different in that with certain tsconfig, chakra-cli produces an empty-ish type definition file. From my own experiment, the cause seem to be the “baseUrl” field in tsconfig.json. I made a repo to show the problem here. Could you please take a look? Thanks.

Hi @suimong!

This seems like a new issue after the release of v2.1.0. If you revert back to v2.0.0 it works as expected in your “failed” commit (c47cb977).

Also, to clarify, adding the following package script also works when reverting to the previous version:

"gen:theme-typings": "chakra-cli tokens ./src/tw-theme/index.ts --out tw-theme2.types.d.ts"

Please kindly post a new issue so this can be better seen, triaged, and reviewed by the folks on the team who have been improving the CLI. I unfortunately have never been inside that tool to provide you any further explanation. full_moon_with_face

@TylerAPfledderer Thanks for testing! I opened issue #6282

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chakra UI Setup with Next.js Throwing Error - Stack Overflow
Try downgrading Chakra to 1.0. 0 and see if it works. If it works find the exported component in the node_modules, then upgrade...
Read more >
Setup a Next.js app with TypeScript and Chakra UI
This is the simplest way to setup your Next. js app with Chakra UI, TypeScript, ESLint and Prettier.
Read more >
Build an Ecommerce Store with Next.js, Auth0 and Cloudinary
Chakra UI to create the user interface. We install the required packages in our application using the CLI command: npm i chakra-ui cloudinary- ......
Read more >
Build a component library with React and TypeScript
React has opened the doors to some awesome projects like Next.js, Gatsby, and Remix, ... like Material UI, Chakra UI, and React-Bootstrap.
Read more >
cannot find module '@emotion/react/jsx-runtime' or its ...
Vercel cli build fails with error "Type error: Cannot find module ... I am not a Next.js developer but I know how to...
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