Storybook: v3.0.0-alpha.0 - shows the following error when getstorybook is run on a project

Created on 18 May 2017  Â·  11Comments  Â·  Source: storybookjs/storybook

getstorybook - the simplest way to add a storybook to your project.

• Detecting project type. ✓
• Adding storybook support to your "Webpack React" app. ✓
• Preparing to install dependencies. ✓

npm ERR! Darwin 16.6.0
npm ERR! argv "/Users/nosh/.nvm/versions/node/v7.3.0/bin/node" "/Users/nosh/.nvm/versions/node/v7.3.0/bin/npm" "install"
npm ERR! node v7.3.0
npm ERR! npm v3.10.10
npm ERR! code ETARGET

npm ERR! notarget No compatible version found: @storybook/react@^2.21.0
npm ERR! notarget Valid install targets:
npm ERR! notarget 3.0.0-alpha.0
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'sws-storybook-app'
npm ERR! notarget

npm ERR! Please include the following file with any support request:
npm ERR! /Users/nosh/simplywallst/sws-storybook-app/npm-debug.log

• Installing dependencies. ✖

 An error occurred while installing dependencies.
bug cli

Most helpful comment

If you npm uninstall -g @storybook/cli and then npm install -g getstorybook, you should get version 2.35.3

FYI check your package.json and remove any additions before rerunning getstorybook... That just bit me.

All 11 comments

Please suggest how can I downgrade to a previous version.

@Nosherwan try this: https://storybooks.js.org/docs/react-storybook/basics/quick-start-guide/

If you use getstorybook it should install the old version (@kadira/storybook 2.3.5)

Let me know if that doesn't work for you!

Unfortunately it didn't either. I have tried those instructions. Any other suggestions are welcome.

I can also confirm that the standard command
npm i -g @storybook/cli
getstorybook
creates a broken storybook environment in which NPM can't install the storybook itself.

It tries to install a version of @storybook/react and addons that aren't published.

I manually added the actual published dependencies to my package.json, ran npm i && npm run storybook and everything worked fine.

{
 "devDependencies": {
    "@storybook/addon-actions": "^3.0.0-alpha.0",
    "@storybook/addon-links": "^3.0.0-alpha.0",
    "@storybook/react": "^3.0.0-alpha.0"
  }
}

Maybe it's a bit confusing that the npm packages getstorybook and @storybook/cli both install a global script accessible via the same alias: getstorybook.

If you npm uninstall -g @storybook/cli and then npm install -g getstorybook, you should get version 2.35.3, as @shilman tried to explain above.

Maybe it's a bit confusing that the npm packages getstorybook and @storybook/cli both install a global script accessible via the same alias: getstorybook.

Is that logged anywhere @ndelangen?

If you npm uninstall -g @storybook/cli and then npm install -g getstorybook, you should get version 2.35.3

FYI check your package.json and remove any additions before rerunning getstorybook... That just bit me.

What @emilong said, and I had to remove the .storybook dir

Thanks everyone for the suggestions. @ajhyndman & @emilong's suggestions worked and I can revert now to getstorybook.

This should be fixed in 3.0.0-alpha.3, let me know if you still run into this issue?

Was this page helpful?
0 / 5 - 0 ratings