-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
CLI: Add pnpm support #19425
CLI: Add pnpm support #19425
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IanVS Should we change this to --package-manager=npm|yarn1|yarn2|pnpm
& deprecate the old flags now that we support a variety of options?
I like that idea a lot @shilman |
Closed by a misclick. I wanted to say I got this note from @jonniebigodes:
And, I've made the change suggested by @shilman. I think that's a much better approach. |
LGTM! |
Is there anything special we need to do to use it? pnpx storybook init --use-pnpm
|
@NatoBoram it is only released in the |
🤦♂️ Thanks. For future reference, the steps are: pnpm i -g storybook@next
pnpm create svelte@latest test_project
cd test_project
pnpm i
storybook init |
That works, or you can use |
I wasn't able to make it work with |
@NatoBoram could you please open an issue with a set of reproduction steps and the error you are seeing? |
Looks like the situation changed, it works now. The command I had used was Regardless, thanks for your help! |
Issue: #19412
What I did
This adds support for the use of pnpm during CLI operations. I kept the same strategy as was used for npm, giving it a
--use-pnpm
flag to force its use. Otherwise, we'll check if it's installed and look for apnpm-lock.yaml
file to determine if we should use it.Note: this also adds support for forcing npm (as well as pnpm) for
sb automigrate
, which was missing before.How to test
I didn't add any end-to-end style test here, but it is possible to verify it's working manually:
You should see pnpm being used to install dependencies. Without the changes in this PR, the installation step would fail.