-
Notifications
You must be signed in to change notification settings - Fork 48
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
Error when running nx run ui-lib:add-component ....
due to 'shadcn-ui' not being recognized
#309
Comments
I can confirm the same error happening with a fresh installation of today |
Hmm, you can run like this |
Are there any solutions yet? |
Aperently they changed the CLI https://ui.shadcn.com/docs/changelog. |
@TriPSs any chance to get it fixed soon? Don't want to be nasty or so, so don't take me like that. Just asking because your plugin came as life-saver for me, but I hit this wall unfortunately :( |
To be honest here: I did a quick look and did not get anything working yet, I am still using the plugin but not very actively so think I will fix this once I need it again. I can still try to fix the version that is being used, maybe that helps. And of course: any PR fixing this is also appreciated. |
The latest version of the UI package does not include the CLI anymore, it's published under `shadcn` now - this PR fixes that by pinning the version to `0.8.0`, the latest previous version that works. It would be nice to start using the new CLI, but it's incompatible with the current setup inside NX: it expects package.json and components.json to be defined within the same directory. I think the better approach would be to implement a NX-specific version of the `add` command instead of using the upstream CLI - it's [not particularly complex](https://github.com/shadcn-ui/ui/blob/main/packages/cli/src/commands/add.ts).
Description
When trying to add a component using the command
nx run ui-lib:add-component card
, I encountered an error indicating thatshadcn-ui
is not recognized as a command.It worked yesterday, but today it doesn't! I think it's due to the shadcn/cli upgrade!
Command Run
Output/Error Message
Expected Behavior
The command should successfully add the
card
component to the project without any errors.Steps to Reproduce
nx run ui-lib:add-component card
.shadcn-ui
.Additional Context
If this issue is specific to my environment or setup, please let me know if there are any dependencies or steps I might be missing.
The text was updated successfully, but these errors were encountered: