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

Using npm to install yarn #504

Closed
MalcolmDwyer opened this issue Nov 3, 2016 · 1 comment
Closed

Using npm to install yarn #504

MalcolmDwyer opened this issue Nov 3, 2016 · 1 comment

Comments

@MalcolmDwyer
Copy link

TLDR: How do I 'npm install yarn', then run 'yarn install' from that yarn?

(Similar to #503)

Motivation

I'm trying to set up a yarn build on an isolated corporate system. We have an internal npm repo, and an internal copy of node_dist. We don't have any internal yarn dist though. By default the 'install-node-and-yarn' execution is getting yarn downloads from https://github.com/yarnpkg/yarn/releases/download/...
However, while there are gzip files reachable there, it's not readable as a directory and therefore, I can't reasonably ask my configuration support people to clone it internally.

I tried pointing the yarnDownloadRoot at our local npm repo. I can find a path where yarn-0.16.0.tgz exists, but the yarnDownloadRoot argument makes incompatible assumptions about how the version number fits into that path.

Requesting either of the following:

  1. A way to install yarn given an npm repo path, instead of a dist path
  2. A way to run yarn from node_modules. In this scenario (similar to what issue 503 is asking), I would use <goal>install-node-and-npm</goal>, then stick in an extra step to run npm install yarn, then I would need a way in <goal>yarn install</goal> to tell it to use the node_modules/yarn/bin/yarn instead of node/yarn/bin/yarn. If there's a configuration variable to do this, I couldn't find it.

Thanks

@eirslett
Copy link
Owner

eirslett commented Nov 3, 2016

The answer is in #490, I posted an example there.

@eirslett eirslett closed this as completed Nov 3, 2016
WesleyRen pushed a commit to WesleyRen/frontend-maven-plugin that referenced this issue Aug 30, 2019
1. eirslett#504: Let user specify a custom location of yarn dist tar ball.
2. eirslett#647: copy installed /node/yarn/yarn-<version> to /node/yarn/dist for execution path.
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

2 participants