-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Install Yarn as suggested in official documentation #351
Comments
I guess the postinstall script has a hard-coded path to yarn? We install yarn in The chosen installation method was because at the time we added yarn (if I remember this right) the debian package wasn't gpg signed. The installation method we chose is based on Docker's recommendation for Official images: https://github.com/docker-library/official-images#security Also, and again my memory is a bit fuzzy here, we worked with the some members of the yarn community on this and this installation method was the best option at the time. I think there were some other issues too, like the debian package assumed the node binary was called The PR that landed yarn and the discussion about install method etc. are here fwiw: |
As a maybe related side note: the docker files for v6.10 (e.g. alpine ) contain the following line:
but running This might cause some confusion when people try to find out which version is coming with which docker image. |
Also, the final image size is a concern when installing yarn, this was the most space efficient method. |
That's right - The main reason Yarn is installed using the standalone .js file is because it used to be much smaller than the other releases of Yarn. However, in Yarn 0.24.x, we updated the Debian package and tarball to just use the bundled .js file rather than packing the individual files, so the sizes are comparable now. I filed #401 for that, before seeing this issue 😛
Debian package is GPG signed if you install it via the package repository. In general, Debian doesn't really GPG sign individual .deb files, only the metadata files for package repositories are signed. You can use
You just need to install it with |
Thanks for the info @Daniel15! We should revisit whether we should install using the debian repo or continue using the tarball as we do today. |
@Starefossen we do not use the tarball today. |
Was playing with this and it looks like this would be what is required for the minimum
You can do the |
Alpine 3.6+ can also do the install now with |
The way this has been installed makes it difficult to upgrade yarn |
Shouldn't be, instructions in https://yarnpkg.com/getting-started/install remain valid afaik |
I had an image which was built before Yarn was added to this project.
I installed Yarn like this:
It was working perfectly fine until I decided to update my image and use the provided Yarn instead of my own. Now my project's postinstall script is crashing with
Error: Cannot find module '/bin/yarn.js'
. If I try to install my own Yarn like above, yours just replace mine and it still doesn't work.Could you just install Yarn as suggested in the official docs?
The text was updated successfully, but these errors were encountered: