Yarn and Meteor


#1

Does anyone forecast any issues running Yarn + Meteor? Since it uses npm, I’m assuming everything works just fine with it. Thought I’d pose the question though.

Cheers,
Mark


#2

It should work just fine! I’m excited that some of the constraint solving and better package management that Meteor has is coming to NPM as well. This might help unblock moving Meteor core packages to NPM sooner.


#3

@sashko Thanks. Appears all is working correctly, with a possible hiccup for bcrypt. yarn installs it, listed in package.json file, but still seeing this message:

W20161012-12:32:08.247(-4)? (STDERR) Note: you are using a pure-JavaScript implementation of bcrypt.
W20161012-12:32:08.314(-4)? (STDERR) While this implementation will work correctly, it is known to be
W20161012-12:32:08.315(-4)? (STDERR) approximately three times slower than the native implementation.
W20161012-12:32:08.315(-4)? (STDERR) In order to use the native implementation instead, run
W20161012-12:32:08.316(-4)? (STDERR)          
W20161012-12:32:08.316(-4)? (STDERR)   meteor npm install --save bcrypt
W20161012-12:32:08.316(-4)? (STDERR)          
W20161012-12:32:08.317(-4)? (STDERR) in the root directory of your application.

I’m assuming yarn will be supported by Meteor given it’s über good reception/response yesterday. So perhaps this is a GitHub issue I’ll need to file?


#4

Is it possible that this is a problem with yarn installing the wrong version of bcrypt? I don’t see why this would be an issue with Meteor. But we can still file it and investigate.


#5

First experience with Yarn are positive. Didn’t run into any issues related to Meteor.


#6

And it’s waay faster than npm. Doing yarn install takes 2-3x less time than npm install for the same project on my machine.


#7

But the node_modules folder has more than doubled in size. Example in a project of mine: npm install node_modules folder is 125MB, with yarn it is 291MB.

Anyone can explain why that is?


#8

Yarn support with Meteor is now being tracked here:

There was also a commit made recently within the 1.4.2 branch that will help with Yarn support.


#9

Are you using Bower? I have noticed that Yarn empties my bower_components directory and moves all that code into node_modules thereby doubling the size of node_modules folder. This bug is being tracked here: https://github.com/yarnpkg/yarn/issues/616


#10

Nope, not using bower. Weird, isn’t it.


#11

Yeah the concept very similar, cache the package locally. Even CLI: yarn add, remove, publish, etc


#12

After I type
meteor npm install -g yarn meteor yarn

It happend ‘yarn’ is not a Meteor command.

Why did this happened?I found that yarn and yarnpkg have already exist in dev_bundle, but not in bin?

My meteor version is 1.4.2.3
Anybody help?


#13

yarn as a sub-command of Meteor is not supported currently. You will need to use it without a prefix of meteor for now.


#14

Are you sure…?


#15

You made me do the research :slight_smile:

Ubuntu 16:

$ meteor --version
Meteor 1.4.2.3
$ meteor npm i -g yarn
  ...
$ meteor yarn info
yarn info v0.18.1
Done in 0.05s.

Windows 10:

>meteor --version
Meteor 1.4.2.3
>meteor npm i -g yarn
  ...
>meteor yarn info
'yarn' is not a Meteor command. See 'meteor --help'.

So, it does work on Ubuntu, but apparently not on Windows.