Pipelines getting stuck on npm i
Asked by Adam Cooke:

Normally our pipeline takes about 15 minutes to run, currently it seems to be getting stuck at the early stages with npm i.

No recent changes to our package.json or pipeline which should affect this.

Installs and builds fine in vscode.

Its seems to be gettings stuck with a large package (351mb) (<https://www.npmjs.com/package/ffprobe-static>). Normally this is not a problem.


Answers:
author: Charlie Davies
body: We are seeing the same issues here building inside the node:18-alpine docker image. Codebase built fine yesterday now it is timing out after 2 hours on the npm i step.

comments: author: Jakob Wardega
body: same for us; ours timeout after 2 hrs


author: Adam Cooke
body: Reply from support:

Bruno M commented:

Hi there,

Thanks for your report. Our team is aware that yarn/npm install commands are being stuck in Bitbucket Pipelines.

Our engineering team has been notified and is currently looking into the route cause and mitigation efforts.

We appreciate your patience while our team is working to address this issue.

We will be providing regular updates on this ticket.

Best regards,  
Bruno M.  
Cloud Engineer \| Bitbucket Cloud Support


author: Charlie Davies
body: [@Adam Cooke](/t5/user/viewprofilepage/user-id/5453090) thank you for the update.


author: Adam Cooke
body: Syahrul commented:

Hello Everyone,

Thanks for reporting the issue to us.

We investigated the issue on our end with help from the Dev team. After a couple of tests, we replicated the issue locally, indicating that the issue was unrelated to the pipeline. Through our testing, we could pinpoint the problem to a single dependency - puppeteer version 21 and lower. In fact, installations solely dependent on puppeteer versions below 22 were observed to freeze during the process.

We have reported this bug to NPM, which you can view and monitor at: <https://github.com/npm/cli/issues/7289>

The solution is to upgrade your puppeteer version to v22 or greater, as we discovered that the issue only affects versions of puppeteer \< v22.

We hope this information is helpful to you. If you have any further questions, please don't hesitate to ask.

-  
**Mohammad Syahrul**   
**Cloud Engineer \| Bitbucket Cloud Support**   


author: Adam Cooke
body: Not sure why this has suddenly stopped working, something in the pipeline enviroment must have changed.


author: Charlie Davies
body: Can confirm that this morning updated puppeteer to latest version and this has fixed the issue - our pipelines are running as they normally would.

Thank you for the swift diagnosis and mitigation of this issue.


author: Jakob Wardega
body: We were able to fix as well by upgrading a puppeteer version from 20 to 22.   

It's interesting to note that we have another package on puppeteer version 2 that was able to remain unchanged  

Thanks to everyone in this thread for raising awareness!


author: John Landgrave
body: This is, apparently, still an issue. I am very puzzled though because everything was building fine until we merged in some code containing a bunch of new stuff (type-graphql, prisma, apollo, etc.) which is leading me to believe that there is some sort of conflict happening in npm that for some reason only happens in the pipeline environment.

Either way, updating puppeteer seems to have resolved the issue -- even though I never was able to reproduce it locally...


author: Jakob Wardega
body: We are having the same issue in some of our pipes, starting today.  

Does yours use <https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1577.0.tgz> ?

comments: author: Adam Cooke
body: No, I've spent all day trying to get it to build. Starting to think its a bitbucket issue


author: Jakob Wardega
body: We have another group in our organization that is facing the same issue. So that makes at least 3 of us. Hopefully they put something out soon.


author: Adam Cooke
body: I have removed the package and reverted all changes since the last successfull build and the pipeline still gets stuck


author: Prithvi Sathiya
body: Im still having this issue for \`npm run build\` when running with \`craco build\`: <https://community.atlassian.com/t5/Bitbucket-questions/Unable-to-run-npm-run-build-in-docker-using-craco/qaq-p/2704640#M104444>


author: Lee Alexis Bermejo
body: We don't have puppeteer.   
we run a docker build from a Dockerfile which has a multistage the first of which has a yarn install which after logging Completed, gets stuck on th subsequent Fetch Step log

This only happens inside the dockerized (docker build .) build step.  
a separate bitbucket step running the exact same yarn install completes with no problem


Tags: bitbucket-cloud

cloud