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

CLI: Use pnpm to install packages if project is using pnpm #19412

Closed
IanVS opened this issue Oct 9, 2022 · 1 comment
Closed

CLI: Use pnpm to install packages if project is using pnpm #19412

IanVS opened this issue Oct 9, 2022 · 1 comment

Comments

@IanVS
Copy link
Member

IanVS commented Oct 9, 2022

Is your feature request related to a problem? Please describe
The problem occurs when adding storybook into a project that has been bootsrapped using pnpm. We already have logic to detect whether the project is using npm or yarn, but not pnpm. And when trying to yarn install or npm install, an error is thrown on pnpm vite projects:

npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:*

To reproduce, in a new folder, run:

pnpm create vite@latest . --template=react
pnpm i
pnpx sb@next init

Describe the solution you'd like
We should look for a pnpm-lock.json file in the project, and if found, use pnpm install.

Describe alternatives you've considered
N/A

Are you able to assist to bring the feature to reality?
Yes, I can give it a shot.

@shilman
Copy link
Member

shilman commented Oct 18, 2022

Ta-da!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-alpha.39 containing PR #19425 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants