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

Including yarn #82

Closed
nguyenchr opened this issue Jul 11, 2017 · 6 comments
Closed

Including yarn #82

nguyenchr opened this issue Jul 11, 2017 · 6 comments

Comments

@nguyenchr
Copy link

I saw that you mentioned you were thinking of including in yarn in #71

Just wondering if there has been anymore thought into this?
It would be useful for my particular use case at the moment

@mhart
Copy link
Member

mhart commented Jul 11, 2017

Yep – still on the cards. A decent workaround is just downloading it as the first step in your build.

@nguyenchr
Copy link
Author

yeah I was thinking that, but my builds are already approaching 5m as it is, for now I'm just using the npm equivalent commands so everything is working dandy 👍

@mhart
Copy link
Member

mhart commented Jul 11, 2017

Oh, the downloading would add only literally a couple of seconds to your build – network speed is fast from Lambda – so I wouldn't worry about that aspect.

@mhart
Copy link
Member

mhart commented May 6, 2019

Going to close this – I think just installing this in your build is the best bet – yarn actually has some issues with disk usage that's made me avoid it on Lambda anyway.

@mhart mhart closed this as completed May 6, 2019
@ajhool
Copy link

ajhool commented Aug 18, 2019

I've had trouble downloading yarn as my first build step using these commands;

FROM lambci/lambda:build-nodejs10.x

ENV AWS_DEFAULT_REGION us-east-1

RUN curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo |  tee /etc/yum.repos.d/yarn.repo
RUN yum install yarn

COPY . .

Is there a working example that could help guide me?

@j0k3r
Copy link

j0k3r commented Sep 30, 2019

Use that in a .sh script:

# manual install yarn
curl -o- -L https://yarnpkg.com/install.sh | bash

# enable yarn in cli
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"

yarn install

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