Skip to content
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

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

Closed
Nosherwan opened this issue May 18, 2017 · 11 comments

Comments

@Nosherwan
Copy link

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.
@Nosherwan
Copy link
Author

Please suggest how can I downgrade to a previous version.

@shilman
Copy link
Member

shilman commented May 18, 2017

@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!

@Nosherwan
Copy link
Author

Nosherwan commented May 18, 2017 via email

@anton-tarasov-qs
Copy link

anton-tarasov-qs commented May 18, 2017

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.

@PaulKiddle
Copy link

PaulKiddle commented May 18, 2017

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"
  }
}

@ajhyndman
Copy link
Contributor

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.

@aaronmcadam
Copy link
Contributor

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?

@emilong
Copy link

emilong commented May 18, 2017

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.

@danrashid
Copy link

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

@Nosherwan
Copy link
Author

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

@ndelangen
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants