Mix between Yarn and npm
See original GitHub issueI just completed the tutorial and enjoyed learning about storybook.
However I noticed a mix of npm
and yarn
commands throughout the tutorial. Would you be interested in a PR consolidating the commands to use either npm
or yarn
throughout for consistency? And if so, which?
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Is there any harm in using NPM and Yarn in the same project?
So, even if we say it's a rare case that it won't cause harm. Mixing npm and yarn should be avoided. Share.
Read more >Migrating from npm - Yarn
Migrating from npm should be a fairly easy process for most users. Yarn can consume the same package.json format as npm, and can...
Read more >Project with mixed NPM and YARN use - DEV Community
I contribute to a project where users use both NPM, and YARN. NPM generates package-lock. json, and yarn generates yarn-lock.
Read more >I have both yarn and npm installed, and they're causing me ...
Yarn and npm are interchangeable. As long as you use the same one each time, there is no difference between them. They have...
Read more >Yarn vs npm: Everything You Need to Know - SitePoint
Yarn stands for Yet Another Resource Negotiator. The Yarn package manager is an alternative to npm, released by Facebook in October 2016. The ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the detailed investigation @jonniebigodes.
My only remaining concern is inexperienced users who happen to have both
yarn
andnpm
installed (i.e. they’ve installedyarn
at some stage for whatever reason, but aren’t experienced enough to mentally translate betweennpm
andyarn
commands).The issue for such users is that
create-react-app
will default toyarn
but all subsequent commands will usenpm
. However, we can fix that by changing the first call to:I checked and if you do that: a) CRA uses
npm
and creates apackage-lock.json
b) then,sb init
also usesnpm
.So my proposal would be
a) add the
--use-npm
flag to the first command b) add a note at that point saying “if you want to useyarn
, drop the--use-npm
and replace allnpm
commands with the equivalentyarn
commands” c) change all calls to usenpm
.Sound good everyone?
@tmeasday i fully understand your reasoning, i was only focusing on experienced users and new users relative to the ecosystem. And wow i didn’t know that, the flag option, wow someone learned something new today(pardon the bad pun). And your proposal looks like the perfect fit for each case. I’m up for it as it will streamline the whole documentation.