Published on March 13, 2017 by LearnCode.academy

Yarn is the hot new drop-in NPM replacement utility for projects using node.js packages. It’s way faster, more stable, and more secure than NPM and you can use it with zero configuration on your end.

In the sample for this video, the NPM install takes between 20 and 30 seconds for just a few packages, while the yarn install takes 4-10 seconds to install all of the node packages.

Yarn is also more predictable across environments, so you don’t need to npm-shrinkswrap anything, because Yarn manages the dependency tree with a yarn.lock file automatically.

Leave a Reply

88 Comments on "Yarn vs NPM – You won’t believe how fast it is"

Notify of
avatar

Joshua Davidson
Guest
Joshua Davidson
1 day 22 hours ago

Yark lock looks nice but when it comes to caching, npm has had it for some time already. You just need to enable it. medium.freecodecamp.com/npm-cache-the-unsung-hero-11e646c09791#.y5tnb4ebj

Web-Crunch
Guest
Web-Crunch
2 days 13 hours ago

I'm "used" to npm but I've tried yarn very briefly and liked it a lot. Can you reference the same npm packages via yarn? Thanks for the insight!

LearnCode.academy
Guest
LearnCode.academy
2 days 3 hours ago

Yep, it still uses the npm registry by default. It just parallelizes the requests for speed and manages the requested-versions better with yarn.lock

Shiv NiceGuy
Guest
Shiv NiceGuy
3 days 19 hours ago

Can you pleaseeeee make a video on how to move 2 SkSpriteNodes simultaneously with touchesmoved. I am making a one device , multiplayer game and I cannot find a way to move 2 SpriteNodes at the same time using 2 different fingers. I also can't find a updated solution anywhere on the internet. In swift 3!!!!!!

moje ime
Guest
moje ime
7 days 1 hour ago

How much math is in JavaScript & is it tough because I suck at math?How much does it take to learn the basics if you set your goal, let's say, to code 2 hours a day?Thanks.Your channel is amazing!Greetings from Bosnia.

Bruno Portela
Guest
Bruno Portela
7 days 3 hours ago

I feel like you are my older coding brother giving me a heads up on whats new and cool in our field.Keep it up, bro! 🙂

LearnCode.academy
Guest
LearnCode.academy
7 days 3 hours ago

+Bruno Portela hah thanks! I don't catch everything ahead of time but try to do my best to find the relevant new stuff

ConquerJS
Guest
ConquerJS
7 days 13 hours ago

You've switched to visual studio code? Are you a fan or just trying it out.

LearnCode.academy
Guest
LearnCode.academy
7 days 3 hours ago

+ConquerJS happily switched! And I've been using Sublime for at least 6 years, so it had big shoes to fill.

Chlorophant
Guest
Chlorophant
7 days 18 hours ago

I missed your videos!

Chlorophant
Guest
Chlorophant
7 days 1 hour ago

Very cool! When I started watching your videos I literally knew nothing. Now 2.5 years later I am a full stack engineer at a fortune 100 company. Thanks for your videos!

LearnCode.academy
Guest
LearnCode.academy
7 days 3 hours ago

+Chlorophant I've been crazy busy on my nights and weekends building a house…it's ALMOST done but I had to get back to videos anyway. 🙂

Eric Noguchi
Guest
Eric Noguchi
7 days 19 hours ago

Hi,Speed difference does not seem to be that great on window maybe?Yarn first run Done in 70.14s.Yarn subsequent runs Done in 40.24s.Npm 50s

LearnCode.academy
Guest
LearnCode.academy
7 days 2 hours ago

+Eric Noguchi oh interesting! If your builds/deployments are on linux then you might still see the benefits, and the lock file management is still HUGE.

Between Layers
Guest
Between Layers
9 days 24 minutes ago

if I'm not mistaken yarn doesn't perform better than npm in windows environment 🙁 same speed, even after caching

LearnCode.academy
Guest
LearnCode.academy
7 days 2 hours ago

+Between Layers oh interesting! If your builds/deployments are on linux then you might still see the benefits, and the lock file management is still HUGE.

Arul
Guest
Arul
9 days 1 hour ago

I hope Yarn is consistent across platforms and dont have the same inconsistencies that NPM had for example on Windows machines

1 2 3 4
wpDiscuz