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

Use yarn instead of npm #53

Whoaa512 opened this Issue Apr 1, 2019 · 5 comments


None yet
4 participants
Copy link

Whoaa512 commented Apr 1, 2019

Couldn't find a way to force zero to use yarn to install packages


This comment has been minimized.

Copy link

asadm commented Apr 1, 2019

You are right. Zero uses npm as of now. The relevant code is here.

I have yet to explore this. Will Yarn make installing and boot any faster? If so, we can def go for this change.


This comment has been minimized.

Copy link

Whoaa512 commented Apr 2, 2019

It can be faster in some cases, but I don't have benchmarks on hand. The main reason for me is that the package resolution algos are slightly different.

I ran into an issue where the latest npm (6.9.0) was not able to resolve my package that I had installed via github with yarn add whoaa512/jsx-pdf

I was able to workaround it by downgrading to npm 5.2.0 after following this thread

However this could have been avoided if I had the ability to use yarn or better yet if zero detected that I was using yarn.lock and automatically used yarn similar to how sindresorhus/np works

I'm in a bit of a crunch mode at the moment but I'll probably try to circle back to this exploration in a few weeks.


This comment has been minimized.

Copy link

Naaman-Saif commented Apr 5, 2019

Benchmarks here do suggest that yarn is ~50%+ faster in terms of speed. We could migrate totally to yarn since both npm and yarn use package.json to create lock files and node_modules.
This can be used in place of

npmi(options, function(err, result) {


This comment has been minimized.

Copy link

antoninadert commented Apr 11, 2019

I really like that npm is the main option for most developers. I wouldn't go to yarn if it was to leave npm completely.
For example there is overhead in installing yarn and learn differences between yarn and npm, which some people do not want to deal with, even if you are 50% faster when installing dependencies (which you shouldn't be doing often anyways !)


This comment has been minimized.

Copy link

Whoaa512 commented Apr 11, 2019

Yea I agree with @antoninadert, my hope is that it would be an opt in deal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.