I am facing error running storybook.... even on a clean installation.
npm run storybook
> @ storybook /media/programmersedge/New_Volume/devs/demostorybook
> start-storybook -p 9001 -c .storybook
sh: 1: start-storybook: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ storybook: `start-storybook -p 9001 -c .storybook`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @ storybook script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I am using the latest storybook version. and my node version is 6.11.1 and npm version is 5.5.1
I also tried installing storybook with yarn but I am facing the same problem yarn version 1.3.2
This error is due to the node_modules folder. If you delete that folder and run
npm install
. it will work. Mostly due to cropped dependency linking If you have configured a react app by yourself then the storyboard may need some other configuration. If you use create-react-app or react-npm-package-developer for React then it should work
In most cases, you need to manually install @storybook/cli
by running
# For npm
npm i -D @storybook/cli
# For yarn
yarn add -D @storybook/cli
I ran into the same issue, the binary has been renamed from storybook
to start-storybook
.
yarn start-storybook
You can check the binary name looking into the node_modules/.bin directory:
ls node_modules/.bin/ |grep storybook
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With