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

Ember-try uses Yarn in Travis CI Trusty Build #125

Closed
zhujy8833 opened this issue May 7, 2017 · 4 comments
Closed

Ember-try uses Yarn in Travis CI Trusty Build #125

zhujy8833 opened this issue May 7, 2017 · 4 comments

Comments

@zhujy8833
Copy link

zhujy8833 commented May 7, 2017

I've experienced the Travis build of my ember-addons throw errors when executing yarn install under ember try:one, the error is because it had troubles to access some of the private npm repos.

Although it is another concern, I was wondering the reason why my Travis build picked Yarn rather than NPM as the package manager. It turns out the condition has been configured as yarn.lock is present and yarn is installed globally since 0.2.12. In my repo I don't have yarn.lock but the fact is I'm using Trusty build of Travis (setting dist: trusty in .travis.yml) and Yarn was preinstalled there.

Is there any option we could set in ember-try to manually configure package managers between Yarn and NPM?

@brlodi
Copy link

brlodi commented Jun 2, 2017

To add a +1 and some clarification on this, it appears ember-try is opting to use Yarn instead of NPM if it is installed, even when there is no yarn.lock file present in the project (just running it in no-lockfile mode to suppress creating one). I'm curious as to the reasoning behind that, as it is effectively forcing Yarn on projects if the host supports it, considering in many CI environments the global installation of Yarn happens outside the control of the developer.

There are some inconsistencies between how Yarn and NPM work (checking Node engine versions, for instance) that can cause CI tests to fail under one that pass under the other. I'm all for switching to Yarn, but I feel like I should decide when that happens by the presence of a yarn.lock in my project instead of having ember-try decide that's what I should be using.

@snewcomer
Copy link

Also curious about this. Have a package-lock.json now in my projects.

@brlodi
Copy link

brlodi commented Jun 22, 2017

package-lock.json is a new thing in NPM 5.0.0, which has taken a lot of inspiration from Yarn.

@kategengler
Copy link
Member

Using yarn is now explicitly chosen via the useYarn: true configuration in config/ember-try.js

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

No branches or pull requests

4 participants