在 Bitbucket 管道中构建包时,Yarn Install 挂起

问题描述 投票:0回答:1

我有一个关于 Bitbucket 管道的问题,我使用一个非常简单的管道来构建一个 docker 镜像,并且它工作了好几个月。 今天在纱线安装过程中突然开始挂起 这是 dockerfile:

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

一切似乎都工作正常,直到纱线开始安装软件包。使用 --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

它就无限期地挂在那里(据我所知,我已经这样放置了 2 个多小时,而且它没有继续前进

我尝试添加 --frozen-lockfile 因为它显然为其他人解决了类似的问题。 我也尝试过使用 --non-interactive 。 我尝试使用 npm,它在安装过程中也挂起,没有错误消息

我有点迷失了,因为我没有对管道进行任何更改,依赖项也没有更改,它只是停止工作了?..

如果有人有任何建议,请帮忙!

npm bitbucket yarnpkg bitbucket-pipelines
1个回答
0
投票

在 bitbucket 管道中也有同样的问题。构建卡在yarn install 命令处并且不再运行任何进一步的构建将在 2 小时后超时。

经过几次故障排除后,我们发现它是造成此问题的依赖项之一。对于我们来说,puppeteer 发现了一个关于此问题的问题 https://github.com/puppeteer/puppeteer/issues/12094

一旦我们删除了 puppeteer 构建,就可以正常工作了。

© www.soinside.com 2019 - 2024. All rights reserved.