question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using both npm and yarn?

See original GitHub issue

Is there a reason this project is using both npm and yarn? I think one or the other could be used exclusively (along with its respective lockfile).

If the reason is ¯_(ツ)_/¯ I’d be happy to submit a PR consolidating to one or the other!

EDIT: Apologies for not explaining where I got the assumptions that both were being used.

  • npm: All commands in the README and some commands in package.json use npm
  • yarn: Three commands in package.json use yarn

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
clintonwoocommented, Oct 14, 2017

Hi, thanks for submitting an issue. The project technically uses a Yarn lockfile and docker builds using Yarn so in that regard it uses Yarn for package management. I originally wrote the documentation using NPM so a developer not familiar with Yarn can still use the project until they are ready to look into Yarn.

Perhaps the decision can be made now which to go with. Yarn is ~25% faster and can be configured for offline mode but npm is the default and has caught up in most ways. NPM is probably the better choice for maximum compatibility. What do you say?

0reactions
clintonwoocommented, May 27, 2019

I updated it to only use npm since it’s the default. The README.md recommends updating to use yarn or pnpm however

Read more comments on GitHub >

github_iconTop 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 >
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 >
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.json both use ...
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 >
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found