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

Yarn: add support for preferred yarn installation method #175

Open
almilo opened this issue Dec 9, 2016 · 9 comments
Open

Yarn: add support for preferred yarn installation method #175

almilo opened this issue Dec 9, 2016 · 9 comments

Comments

@almilo
Copy link

almilo commented Dec 9, 2016

Installing yarn through npm produces the warning: "It is recommended to install Yarn using the native installation method for your environment"
As yarn itself is a replacement for npm, it would be nice to have yarn installed without relying on npm. What would also get rid of the annoying warning :)

Pinging @kaitoy to get his input on this.

Thanks for the great work!
Alberto

@kaitoy
Copy link
Contributor

kaitoy commented Dec 13, 2016

Yarn used to be suggesting to use NPM for its installation but now...
It seems Yarn is not providing a platform dependent way to install nor a way to install it to specified path other than NPM. The latter is required to avoid the plugin's changing users' global environment.

@mattbrictson
Copy link

You can install Yarn in a platform-independent manner to any desired path by downloading and extracting the tarball (https://yarnpkg.com/latest.tar.gz), as documented here:

https://yarnpkg.com/en/docs/install#manual-install-via-tarball

@srs
Copy link
Owner

srs commented Dec 17, 2016

That could be done. But should we be able to se yarn version? Is yarn having an archive with old tarballs?

@kaitoy
Copy link
Contributor

kaitoy commented Dec 18, 2016

I read Yarn install script; https://yarnpkg.com/install.sh.
This uses https://yarnpkg.com/downloads/$version/yarn-v$version.tar.gz to download the specified version of Yarn.
I confirmed this URL works for the oldest version 0.14.0.

@henrik242
Copy link

Yarn install with npm currently fails for us, as of some hours ago, when bl@1.2.0 was released. bl@1.1.2 works, see yarnpkg/yarn#1774 (comment)

We work around this locally by overriding yarnSetup to use the preferred installation method (downloading and unpacking the tgz).

@almilo
Copy link
Author

almilo commented Jan 8, 2017

any progress on this? we are having issues when installing yarn through npm.

@zman2245
Copy link

I too am having issues, such as the following: yarnpkg/yarn#2915

@seshness
Copy link

seshness commented Apr 7, 2017

There's an even easier-to-use yarn distribution. yarn bundles a single JavaScript file with each release:

Did you know that Yarn is also distributed as a single bundle JS file in releases that can be used on CI systems without internet access?

https://yarnpkg.com/blog/2016/11/24/offline-mirror/

@MikeN123
Copy link

MikeN123 commented Jul 7, 2017

What is the status of this issue? I see a PR, but there does not seem to happen a lot.

The current way of working is unreliable. Our build broke all of a sudden, simply because the npm installer fetched another version for a yarn dependency...

fviernau added a commit to oss-review-toolkit/ort that referenced this issue Sep 13, 2018
NPM needs to be installed in order to bootstrap Yarn
since the Gradle Node plugin install Yarn via NPM. For
this installation to work the download flag needs to
be set.

Also for not nefatively affecting reproducibility of
build setting a fixed NPM version.

See also the related issue [2] and open pull request [1].

[1] srs/gradle-node-plugin#186
[2] srs/gradle-node-plugin#175
fviernau added a commit to oss-review-toolkit/ort that referenced this issue Sep 14, 2018
NPM needs to be installed in order to bootstrap Yarn
since the Gradle Node plugin installs Yarn via NPM,
see also [1] [2]. For this installation to work the
download flag needs to be set.

Also set a fixed NPM version for the reproducibility
of builds.

[1] srs/gradle-node-plugin#175
[2] srs/gradle-node-plugin#186
fviernau added a commit to oss-review-toolkit/ort that referenced this issue Sep 14, 2018
NPM needs to be installed in order to bootstrap Yarn
since the Gradle Node plugin installs Yarn via NPM,
see also [1] [2]. For this installation to work the
download flag needs to be set.

Also set a fixed NPM version for the reproducibility
of builds.

[1] srs/gradle-node-plugin#175
[2] srs/gradle-node-plugin#186
fviernau added a commit to oss-review-toolkit/ort that referenced this issue Sep 14, 2018
NPM needs to be installed in order to bootstrap Yarn
since the Gradle Node plugin installs Yarn via NPM,
see also [1] [2]. For this installation to work the
download flag needs to be set.

Also set a fixed NPM version for the reproducibility
of builds.

[1] srs/gradle-node-plugin#175
[2] srs/gradle-node-plugin#186
fviernau added a commit to oss-review-toolkit/ort that referenced this issue Sep 14, 2018
NPM needs to be installed in order to bootstrap Yarn
since the Gradle Node plugin installs Yarn via NPM,
see also [1] [2]. For this installation to work the
download flag needs to be set.

Also set a fixed NPM version for the reproducibility
of builds.

[1] srs/gradle-node-plugin#175
[2] srs/gradle-node-plugin#186
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

8 participants