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

Allow use of npm instead of yarn (e.g. --use-npm flag) #2904

Closed
kroeder opened this issue Feb 2, 2018 · 3 comments
Closed

Allow use of npm instead of yarn (e.g. --use-npm flag) #2904

kroeder opened this issue Feb 2, 2018 · 3 comments

Comments

@kroeder
Copy link
Member

kroeder commented Feb 2, 2018

Issue details

I am behind a proxy and can't use yarn. Please introduce a way to use npm instead of yarn install when fireing getstorybook

Steps to reproduce

Call getstorybook

Please specify which version of Storybook and optionally any affected addons that you're running

Storybook for Angular

Affected platforms

Environments that depend on npm instead of yarn

Screenshots / Screencast / Code Snippets (Optional)

$ getstorybook

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

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

yarn install v1.3.2
info No lockfile found.
[1/4] Resolving packages...
error Couldn't find package "tslib" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@Hypnosphi
Copy link
Member

Hypnosphi commented Feb 2, 2018

Well we actually have this flag:

$ getstorybook -h

  Usage: getstorybook [options]


  Options:

    -V, --version                         output the version number
    -f --force                            Forcely add storybook
    -s --skip-install                     Skip installing deps
    -N --use-npm                          Use npm to install deps
    -p --parser <babel | babylon | flow>  jscodeshift parser
    -h, --help                            output usage information

@Grsmto
Copy link

Grsmto commented Feb 21, 2018

Hey,
So getstorybook uses Yarn but once you want to install an addon, the doc says to use npm: npm i --save-dev @storybook/addons @storybook/addon-actions @storybook/addon-links @storybook/addon-notes for example on the Using addons section.
This mix of Yarn and npm literally makes Create React App not work anymore (ie you can't npm start without a crash).

@Hypnosphi
Copy link
Member

You definitely can use yarn to install any dependencies you want, the choice is only yours

This issue was closed.
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

4 participants