In 2021, Yarn vs. NPM Is there a better one?
martin rojas

martin rojas @martinrojas

About: a passionate UI architect/developer creating modern and responsive experiences for Web, Mobile, and Physical Installations

Location:
Atlanta, GA
Joined:
Dec 5, 2019

In 2021, Yarn vs. NPM Is there a better one?

Publish Date: Aug 1 '21
3 4

So I know that this is one of those topics that's more about preference in 2021. I want to hear from both sides and see if my assumptions need to be updated.

Personally I favor Yarn and have done so for about 4 years working mostly on React projects in teams with 3 - 10 developers. Yarn and it's locked files removed issues of dependencies being a different version and sometimes causing weirdness. Similarly the CI versions have seem to create consistent builds. Finally the lock file is stable and only really changes when a package version is updated, while the last time I used npm the lock file updated a lot more often for no reason.

I would love to hear and have a discussion on the state of NPM and Yarn what the feelings are out there.

Comments 4 total

  • Dhaiwat Pandya
    Dhaiwat PandyaAug 2, 2021

    I don't know if it's 'better', but there is pnpm.

  • Ishan Tiwari
    Ishan TiwariAug 3, 2021

    Yarn is wayyyy better then npm atleast for me. It just throws npm out in every spec either performance or speed or whatever.

  • José Thomaz
    José ThomazAug 3, 2021

    yarn is much faster, at least for my PC

  • Thanh Minh
    Thanh MinhAug 17, 2021

    Since v5, npm has improved a lot in speed. Now npm is faster than yarn. I tested it on cloud server as well as my PC and the result is pretty good for npm.

Add comment