storybook: sh: start-storybook: command not found
what’s wrong?
> redux-todomvc-example@0.0.0 storybook /Users/zhouming/Desktop/model/storybookmodel
> start-storybook -p 9001
sh: start-storybook: command not found
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "storybook"
npm ERR! node v6.2.2
npm ERR! nam v3.9.5
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! sys call spawn
npm ERR! redux-todomvc-example@0.0.0 storybook: `start-storybook -p 9001`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the redux-todomvc-example@0.0.0 storybook script 'start-storybook -p 9001'edux-todomvc-example@0.0.0 storybook /Users/zhouming/Desktop/model/storybookmodel
> start-storybook -p 9001
sh: start-storybook: command not found
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "storybook"
npm ERR! node v6.2.2
npm ERR! nam v3.9.5
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! sys call spawn
npm ERR! redux-todomvc-example@0.0.0 storybook: `start-storybook -p 9001`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the redux-todomvc-example@0.0.0 storybook script 'start-storybook -p 9001'
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 43 (12 by maintainers)
I’ve solved it by myself, because I didn’t use: ‘npm install’
I did
rm -rf node_modulesand thennpm install.Still the same here on Windows 10, Node 8.0 and NPM 5.0.3
Used Instructions from the website
Same error.
EDIT: Turns out
getstorybookdoesnt even installstorybook-react, even though it recognised the “create react app” base project. For anyone experiencing the same, just execnpm i --save-dev @storybook/reactFor anybody who stumbles on this issue and is using Storybook 7.0, we’ve removed
start-storybookandbuild-storybook:https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#start-storybook--build-storybook-binaries-removed
tl;dr –
build-storybookshould bestorybook buildFrom the Storybook Docs:
start-storybook/build-storybookbinaries removed❌ A typical Storybook project includes two scripts in your projects package.json:
✅ To convert this project to 7.0:
Neither of the commands works for me. I upgraded sb to
^7.0.0-alpha.52and nothing budges. I tried:"nuke": "rm -rf node_modules yarn.lock && yarn cache clean --all && yarn",storybook dev -p 6006start-storybook -p 6006My sb packages:
I had the same issue with @storybook/react and solved it as mentioned above:
Also having this issue after upgrading to v7.0.2. Package diff below…
to
The problem is that there is no start-storybook cmd or binary for windows. How to get this tool?
I had the same issue with @storybook/vue and solved it as mentioned above:
npm i -D @storybook/vue yarn add -D @storybook/vue
Had this issue in an Ember app, this enabled the
start-storybookcommand for me:By the way, if you used the CLI to initialize your project and then maybe tried using Docker and it didn’t work, you have to install the CLI as a dependency too.
@Rodnorm using both npm dependency managers is not a good idea. You should stick to one to manage a repo.
Seeing this issue as well.
Hello,
Same error. I have installed the latest version of @storybook/vue
and the binaries are now missing (only
test-storybookfor test-runner, but not related…):@shilman, or other, any idea ?
Regards
lolmaus’s solution also works for @storybook/angular.
I’m also experiencing this issue:
Any ideas?
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#start-storybook--build-storybook-binaries-removed
I’ve got the same issue, running
yarn storybookafter upgrading to7.0.0-beta.38does not work.What does work is to copy the
package.json(updated to v7) to a different folder, installing, runningnpx sb@next init.yarn storybookwill work in this folder.I don’t know enough of how
npmsets up its binaries and such to know how to troubleshoot this any further. The nuke option by @pawelkrystkiewicz above here has no effect.Note:
node_modules/.bin/storybookis present, so running./node_modules/.bin/storybook devdoes work.sudo rm -rf node_modules && sudo rm -rf package-lock.json solved for me
👆 I believe it’s
npm cache clean --forceI’m also experiencing this issue, run
npm installstill not work, but I remove the total node_modules then runnpm installcan workand there is my error log :
so it installs and works fine. But actually, when I on the Windows I use cmder instead of native
cmd.com- it’s the only way to survive with Windows for me! ☺️I tried to do the same on the cmd terminal and I’ve got an error after
npm run storybook(getstorybookworks fine actually):but since I didn’t do such tests before I can’t say is it a new issue or it existed before.
Anyway, I’m not sure that we could still have issues related to
sh: start-storybooksince we don’t use shell commands in our scripts. So I guess @axed’s case is something new and possible it’s worth to submit a new issue starting with detailed reproducing infoPS @shilman at this stage of @3.2.0-alpha we have an issue with
@storybook/componentsrequiring