sh: start-storybook: command not found after upgrading to latest release

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

12reactions
coopbricommented, Aug 14, 2022

I had this issue too, and discovered in the v7 release notes that start-storybook and build-storybook were removed. Here’s the PR and a similar discussion here: https://github.com/storybookjs/storybook/issues/18675

I 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.19 based on your listed env info) and then sb dev worked!

4reactions
brianfoodycommented, Aug 16, 2022

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;

"storybook": "sb dev",
"build-storybook": "sb build"

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error running storybook - sh: 1: start-storybook: not found
This error is due to the node_modules folder. If you delete that folder and run npm install . it will work. Mostly due...
Read more >
Install Storybook
Install Storybook. Use the Storybook CLI to install it in a single command. Run this inside your existing project's root directory:.
Read more >
[SOLVED] sh: sb: command not found storybook React js/Next js
today in this video i'm going to show you how to fix this error occurred when to try to add storybook to your...
Read more >
sh: 1: start-storybook: not found-Reactjs - appsloveworld
I know it sounds dumb, but when we are tired sometimes we commit dumb errors. Yeonathan Aizenberg 21. score:2. npm i --save-dev @storybook/react...
Read more >
Storybook Archives - Aaron.kr
Last week, I'd had trouble setting up Storybook on the Windows computer – it kept giving me a sh: start-storybook: command not found...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found