-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
ERR! on npm run storybook #145
Comments
I think you forgot to add the npm script. Add |
The same situation: |
I'm having the same issue. The storybook script is there, but I'm getting: "sh: 1: start-storybook: not found" |
@decoursin Are you using windows? |
I'm using Linux. |
I switched from npm 2.x.z to 3.y,z, rm -rf node_modules, and now it's working. I'm not sure at all if this was the issue. |
Switched the storybook to 1.6.0 version, and it started working fine. I'm using react 0.14.8. |
created stories + config. |
I had the same error becouse I had installed npm install react-storybook instead of npm install @kadira/storybook |
Hi Guys i have same problem
Running on Windows after npm install
|
Hmm. Seems like we are only support bash. We need to add support for windows. |
@szopenkrk can you follow these steps and try again?
{
"scripts": {
+ "storybook": "start-storybook -p 9001"
}
}
if you're trying to use storybook with your react app, install from npm
If you're trying to contribute to this repo (thanks) please wait a few days until we make the prepublish script cross platform ( or you can help us out with that issue itself #300 ). |
OK i have solution
and in demo we dont need add "storybook": "start-storybook -p 9001" because we have it there. |
I am also encountering this problem, despite trying all the fixes suggested above (including removing node modules and reinstalling them, adding storybook to the scripts in package.json etc) |
@satstanford try to use |
@mnmtanish thanks for your comment on installing from npm. Could we add this command to the docs...
...explaining that this is how to install if you to run I'm happy to do the PR myself. |
@jonathanconway I think everything is documented properly. |
This is package.json created after running create-react-app to create my-stories-app. You need to pay attentions to the default versions created for "react", "react-dom" and "react-scripts" under "dependencies": I probably looked through every answer, tried them, all not working. I even had gone to the point that finally "npm run storybook" didn't give me any error after "npm i -D @kadira/storybook" as provided by mnmtanish, but when I access http://localhost:6006, there was a run-time JS error that stated "... string ... not found" which I didn't know what it meant and didn't bother to trace. Here is my new package.json in which I used specific versions that finally could bring up the app problems free. Again, pay attention to the versions of "react", "react-dom" and "react-scripts" under "dependencies". The above is the proof that getstorybook is not updated with the default versions created by create-react-app. |
Based on the information provided by Hypnosphi, here are the steps of my second try: By following https://www.npmjs.com/package/@storybook/cli:
Voila! Thank you very much, Hypnosphi. |
I just had this happen when following the (Slow) Storybook for React docs with the latest version (4.1.1). Looking into it further, it looks like the sb init step is missing from the docs, telling users to start it up right after adding the script and config. https://storybook.js.org/basics/guide-react/ So as long as I run sb init after setting up the config and before starting SB, all works as intended. |
@3desprit Thanks, just ran into the same issue, that |
same problem here |
I get thesse errors: What am i doing wrong?
npm run storybook
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/Cellar/node/5.10.1/bin/node" "/usr/local/bin/npm" "run" "storybook"
npm ERR! node v5.10.1
npm ERR! npm v3.8.3
npm ERR! missing script: storybook
The text was updated successfully, but these errors were encountered: