storybook: sh: start-storybook: command not found after upgrading to latest release
Describe the bug
I upgraded our version of Storybook in our React project to the latest version ^6.5
Afterwards I have the following issue when trying to run Storybook - sh: start-storybook: command not found
Using a Macbook.
Then upgraded to pre-release to see if it resolved.
To Reproduce Upgrade Storybook and try to run it.
System Environment Info:
System: OS: macOS 12.1 CPU: (10) arm64 Apple M1 Pro Binaries: Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node npm: 8.17.0 - ~/Desktop/customer_contact_work/cc-component-library/node_modules/.bin/npm Browsers: Chrome: 104.0.5112.79 Safari: 15.2 npmPackages: @storybook/addon-actions: ^7.0.0-alpha.18 => 7.0.0-alpha.19 @storybook/addon-essentials: ^7.0.0-alpha.18 => 7.0.0-alpha.19 @storybook/addon-links: ^7.0.0-alpha.18 => 7.0.0-alpha.19 @storybook/builder-webpack5: ^7.0.0-alpha.18 => 7.0.0-alpha.19 @storybook/cli: ^6.5.10 => 6.5.10 @storybook/manager-webpack5: ^7.0.0-alpha.10 => 7.0.0-alpha.10 @storybook/react: ^7.0.0-alpha.18 => 7.0.0-alpha.19 Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (2 by maintainers)
I had this issue too, and discovered in the v7 release notes that
start-storybookandbuild-storybookwere removed. Here’s the PR and a similar discussion here: https://github.com/storybookjs/storybook/issues/18675I had to install
@storybook/cli(make sure the version is the same as the Storybook core you are using, e.g.7.0.0-alpha.19based on your listed env info) and thensb devworked!If you have upgraded to storybook 7 and found yourself here then the problem is start-storybook is removed and the migration doesn’t modify for some reason.
To fix modify your scripts to;
Also check out the migration guide - https://github.com/storybookjs/storybook/blob/4a532ec8d8922ddf6b7a7e1cc68d88b35377b0a6/MIGRATION.md#start-storybook--build-storybook-binaries-removed
I was missing some things
Run
npx storybook@next automigrateand follow the prompts because youre using a newer version of storybook wherestart storybookandbuild storybookhave been removedThis sorted me out. caveat: I did blindly accept all the changes
npx sb@next automigrateThanks @Abeinevincent, It works well.
@zackhamin check out this https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#story-type-change-to-storyfn-and-the-new-story-type-now-refers-to-storyobj
I think you need to go from
to
note the StoryFn