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

[Feature Request] Option to Skip Installation #110

Open
oclyke opened this issue Nov 8, 2024 · 2 comments
Open

[Feature Request] Option to Skip Installation #110

oclyke opened this issue Nov 8, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@oclyke
Copy link

oclyke commented Nov 8, 2024

Is your feature request related to a problem? Please describe.

Hi.

I have a problem with my monorepo where nextui add <component> will always fail in the execution of npm install.

My NextUI app is one of several workspaces -- some workspaces are managed using Yarn and the NextUI app is managed with NPM (because of other issues with Yarn PnP not seeming to play nicely with NextUI).

When I install dependencies for this app (with npm install) I have to specify the --workspaces=false option to avoid an error about another workspace using an invalid URL format (this is unrelated to NextUI).

The issue is that nextui CLI tool calls npm install (AFAICT) without any way to pass options to that command.

Describe the solution you'd like

The simplest way to solve this for me is to make it so that nextui add does not perform the actual installation.

This could be done by default and docs updated to show users that they need to run dependency installation manually.

Although I would prefer the above option (decouple nextui add from the job of installation) it would also work for me just to get a --no-install flag or something like that.

Describe alternatives you've considered

Maybe nextui add is complex and can't assume just one invocation of npm install at the end of the task... maybe the steps to install a new component are convoluted. If this is the case then I would like an option for nextui add to just write out the instructions of what is necessary to install the component. This would be an option of the user (e.g. nextui add <component-name> --dry-run-show-steps)

Screenshots or Videos

Screenshot 2024-11-08 at 9 42 52 AM
@winchesHe
Copy link
Member

@oclyke Thanks you reported, you can use option --debug to avoid install now

@winchesHe
Copy link
Member

But you also need to manual add @nextui-org/slider in your pacakge.json and run install

@winchesHe winchesHe added the enhancement New feature or request label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants