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

storybook scripts disappaers from node_modules after using upgrading to prerelease #18675

Closed
clowNay opened this issue Jul 11, 2022 · 4 comments

Comments

@clowNay
Copy link

clowNay commented Jul 11, 2022

Describe the bug
start-storybook and build-storybook scripts disappears after using npm sb upgrade --prelease

To Reproduce
Seems like it's unable to create a reproduction also, after using upgrade, it tries to use both yarn and npm, even though my packages are installed with npm.

System
Environment Info:
System:
OS: macOS 12.3.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Binaries:
Node: 18.4.0 - ~/.nvm/versions/node/v18.4.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.4.0/bin/yarn
npm: 8.12.1 - ~/.nvm/versions/node/v18.4.0/bin/npm
Browsers:
Chrome: 103.0.5060.114
Firefox: 89.0.2
Safari: 15.4
npmPackages:
@storybook/addon-actions: ^7.0.0-alpha.12 => 7.0.0-alpha.12
@storybook/addon-essentials: ^7.0.0-alpha.12 => 7.0.0-alpha.12
@storybook/addon-interactions: ^7.0.0-alpha.12 => 7.0.0-alpha.12
@storybook/addon-links: ^7.0.0-alpha.12 => 7.0.0-alpha.12
@storybook/builder-vite: ^0.2.0-beta.2 => 0.2.0-beta.2
@storybook/testing-library: ^0.0.14-next.0 => 0.0.14-next.0
@storybook/vue3: ^7.0.0-alpha.12 => 7.0.0-alpha.12

Additional context
Add any other context about the problem here.

@francisashley
Copy link

Also having this issue.

@pocka
Copy link
Contributor

pocka commented Jul 22, 2022

Both start-storybook and build-storybook are replaced1 to sb dev and sb build in Storybook v7.0.0-alpha.0. You may also need to install @storybook/cli package2.

Footnotes

  1. https://github.com/storybookjs/storybook/pull/17899, https://github.com/storybookjs/storybook/releases/tag/v7.0.0-alpha.0

  2. https://github.com/storybookjs/storybook/issues/18420#issuecomment-1179607312

@ggascoigne
Copy link

It would be really nice if those deprecated scripts were replaced by shells that told you what the new commands were, and that you'd need to install a new package. It took a while to find this bug.

@pocka
Copy link
Contributor

pocka commented Aug 8, 2022

Closing as the change is stated in MIGRATION.md.

@ggascoigne
I believe #18421 (migration command that replaces start-/build-storybook inside package.json#scripts) would solve the problem you stated. What do you think?

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

4 participants