Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated shadcn-ui plugin #340

Closed
bzp2010 opened this issue Nov 14, 2024 · 4 comments
Closed

Outdated shadcn-ui plugin #340

bzp2010 opened this issue Nov 14, 2024 · 4 comments

Comments

@bzp2010
Copy link
Contributor

bzp2010 commented Nov 14, 2024

Description

Some time ago, the shadcn-ui project added a new sidebar component and I tried to add it in the ui project and I got the following error, it looks like the component does not exist.

nx add-component shadcn-ui sidebar

> nx run shadcn-ui:add-component sidebar


Running:
pnpm dlx [email protected] add sidebar --path=src --cwd=packages/shadcn-ui
Selected components not found. Exiting.

I checked the docs for shadcn-ui and they mention that the project has switched to the new command line shadcn instead of the [email protected] that we're still using, and I'm guessing that maybe it's causing the problem I'm having.

I tried switching to shadcn's direct use on the new command line, and it also had some issues such as not being able to find the package.json or asking me to recreate the project among some other things.

Do you have any ideas about this? Thanks 🙏

@TriPSs
Copy link
Owner

TriPSs commented Nov 14, 2024

Please see #309 for some more info. PR's are welcome.

@bzp2010
Copy link
Contributor Author

bzp2010 commented Nov 14, 2024

Let me check it out and if I can handle that, I'll try to fix it. 🙏

@bzp2010
Copy link
Contributor Author

bzp2010 commented Nov 14, 2024

Since the command executed by our plugin is relatively fixed, I skipped it and tested directly with the generated command.
After some hard attempts, I realized that there are a lot of differences between the command line tools of shadcn and shadcn-ui, the original components.json is no longer available, and here are some new checks for tsconfig.

There are a lot of things that need to be changed if you want to migrate to the new command line.
So far I've implemented a recipe that just about makes it work, but I think it's not the way shadcn's developers intended. Because we need some configurations that look strange to other people, and after that, it works.

Anyway, I will try a PR.

@bzp2010
Copy link
Contributor Author

bzp2010 commented Nov 14, 2024

Hi @TriPSs

I have created a PR but I am not familiar with this repository, could you please check? 🫡

#341

TriPSs added a commit that referenced this issue Nov 15, 2024
Fix #309 #340

Move `shadcn-ui` CLI to `shadcn` CLI for add components.
@TriPSs TriPSs closed this as completed Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants