Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Yarn vs NPM #39

Closed
daviddias opened this issue May 28, 2018 · 7 comments
Closed

Yarn vs NPM #39

daviddias opened this issue May 28, 2018 · 7 comments

Comments

@daviddias
Copy link
Contributor

During the last js-ipfs Weekly All Hands -- ipfs/js-ipfs#1179 (comment) --, there were a lots of question about Yarn vs NPM (https://youtu.be/CNAPR9HMjR4?t=26m57s).

@victorbjelkholm @travisperson can you expand on the rationale behind it and if it still holds true with the latest npm vs yarn?

@victorb
Copy link
Contributor

victorb commented May 28, 2018

As far as I understand the call, it's less about the CLIs themselves but more regarding lock-files. That would be a more appropriate conversation in ipfs/community. For that conversation, we need to figure out a way of making lock-files work for both npm/yarn and consumers/developers, which right now, is tricky.

Regarding running yarn on CI, it's faster and worked when running multiple instances on the same worker, npm didn't, so we went with yarn there. Situation might be better now (and we're not leveraging the multiple jobs per worker anyways right now) so we can give npm a try. npm still seems to be the de-facto standard for JS so makes sense that we use it as well.

@travisperson
Copy link

I out of habit still use yarn pretty extensively except in a few cases where it does not meet feature parody. I originally made the switch a year ago with my team due to lock-file issues. I'm pretty sure most of the grievances no longer exist.

Unless there is a specific reason for the use of yarn for IPFS, I think it's best to keep to npm for simplicity in the community going forward.

@victorb
Copy link
Contributor

victorb commented May 30, 2018

Anecdote but since the conversation of npm vs yarn came up again, I started using npm. I did not even manage to install modules for js-ipfs on latest version (6.1.0) with nodejs 9.5.0, while yarn as no issues with it.

So while we can decide as a org to move forward with npm, I cannot myself do this yet as it doesn't work for even the most basic use-case, installing packages.

image

@daviddias
Copy link
Contributor Author

Try with Node.js 8 and 10, not 9.

@victorb
Copy link
Contributor

victorb commented May 30, 2018

@diasdavid pretty sure it's about npm, not node.js. But I tried node.js 8 and 10, with no success. Then I tried npm@6.0.0 and npm@5, same failures. Then I got tired and tried npm@2 instead, and success! Everything worked! So I guess I either have some weird state on my machine, or npm simply does not work well on linux nowadays.

https://gist.github.com/VictorBjelkholm/93a818c4d360022b43bd5b5b55663776

@travisperson
Copy link

Interesting. I just ran an install on linux with nodejs 8.11.2, and npm 5.6.0 with no issues.

@dryajov
Copy link

dryajov commented May 31, 2018

I've been using npm exclusively with various node versions (8, 9, 10) as well as npm 5.6 and 6.0 without any issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants