Yarn Install hangs while building packages in Bitbucket pipeline

122 views Asked by At

I have an issue with Bitbucket pipelines, I use a very simple one to build a docker image and it worked fine for months. Today it suddenly started hanging during yarn install Here's the dockerfile:

FROM node:20
WORKDIR /client
COPY ./client ./
RUN yarn install
RUN npm run build:stage

Everything seems to work fine until yarn starts installing the packages. I get the following logs when install with --verbose:

[4/4] Building fresh packages...

...

verbose 162.942549661 Saving to file: /tmp/121.0.6167.85/chromedriver/chromedriver-linux64.zip
Current existing ChromeDriver binary is unavailable, proceeding with download and extraction.
Downloading from file:  https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/121.0.6167.85/linux64/chromedriver-linux64.zip
Received 1024K...
Received 2053K...
Received 3093K...
Received 4133K...
Received 5173K...
Received 6213K...
Received 7253K...
Received 8293K...
Received 8440K total.
Extracting zip contents to /tmp/121.0.6167.85/chromedriver.
Copying from /tmp/121.0.6167.85/chromedriver/chromedriver-linux64 to target path /client/node_modules/chromedriver/lib/chromedriver
Fixing file permissions.
Done. ChromeDriver binary available at /client/node_modules/chromedriver/lib/chromedriver/chromedriver

And it just hangs there undefinitely (as far as I know, I've left it like that for 2+ hours and it didn't move forward

I tried adding --frozen-lockfile as it apparently solved something similar for someone else. I tried with --non-interactive as well. I tried with npm instead and it's also hanging during the installation process with no error message

I am kind of lost because I didn't change anything to the pipeline, there's no changes in dependencies, it just stopped working?..

If anyone have any suggestion, please help!

2

There are 2 answers

0
P_RIFF On BEST ANSWER

It seems to have been resolved over the week-end without any input from me. I just reran the pipelines and it worked fine.

This is resolved on my end.

1
anil chalissery On

Had same issue in bitbucket pipeline. Build was stuck at yarn install command and does not run any further build will time out after 2hrs.

after several troubleshooting we figured out its one of the dependency creating this issue. For us it was puppeteer found a issue being raised on this https://github.com/puppeteer/puppeteer/issues/12094

Once we removed that puppeteer build was working fine.