Installing Yarn on Amazon Linux 2 Instance with yum in prebuild hook

0

I've been successfully installing yarn as part of a prebuild hook for the last several months, but overnight it has stopped working.

I believe it is not working due to a dependency conflict or a network issue, although I'm not getting many errors in var/log/eb-hooks.log

When running

sudo curl --silent --location https://rpm.nodesource.com/setup_14.x | sudo bash -  
sudo yum -y -v install nodejs  

It seems to resolve everything fine until
It prints this:

Downloading packages:  

Then it moves onto my next command in the script. Without actually downloading any packages.

The same thing happens when I run:

sudo curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo  
sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg  
sudo yum -y -v install yarn  

Again it doesn't do anything/wait after printing

Downloading packages:  

Nothing in my code changed in the last 24hrs, according to AWS EB there was no managed updates, so possibly it's an issue with yum?

My full script looks similar to this: https://gist.github.com/cooperka/0960c0652353923883db15b4b8fc8ba5#gistcomment-3390935

Any insight would be really helpful because I can't deploy my code until I fix this (or switch to npm I guess)

Thanks

Edited by: darraghmckay on Nov 4, 2021 1:39 PM

asked 3 years ago2337 views
4 Answers
0

FYI - You're not alone as I'm having the same issue. Watching with interest.

tfossum
answered 3 years ago
0

It seems this is a widespread problem as documented here: https://github.com/nodesource/distributions/issues/1290

tfossum
answered 3 years ago
0

That's reassuring, I couldn't find anything myself

answered 3 years ago
0

Following up: The issue seems resolved and I'm able to deploy again. I hope it's working for you, too.

tfossum
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions