The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket Pipeline Timeouts on npm install

Kiril Velichkov
March 15, 2024

We have bitbucket project that uses bitbucket pipelines.

Here is what our pipeline looks like

```

image: node:18.17.0
pipelines:

feature/*:
- step:
name: Unit Tests and Linting
script:
- npm install
- npm run lint
- npm run test:coverage -- --runInBand
```

Everything was working fine for a year, but since yesterday the pipeline started to timeout on the npm instsall command.
I have tried to re run old pipeline that have passed before, but they still fail, which means the issue is not introduced by a change from us, because we haven't even changed the package.json for a long time.


Any ideas or suggestions what could have caused this issue and how to fix it?

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Kiril Velichkov
March 15, 2024
0 votes
Kiril Velichkov
March 15, 2024

Thank you @Eduardo Asenjo 
I will try this and write back later

0 votes
Eduardo Asenjo
March 15, 2024

Not a full solution to your problem, but a recommendation.

 

Recommendation 1:  

Use `npm ci` instead of a full install.  `npm ci` will install directly the definitions from the `package-lock.json` instead of getting latest version of everything from your package.json and recalculating everything. It will be more consistent with your developer and local machines.

 

Recommendation 2:

When using `npm` I'd recommend to use the `cache: node` bitbucket pipeline notation, so it will cache all packages and save loads of time when running that steps.

Take a look to this: Caches | Bitbucket Cloud | Atlassian Support

This may make your builds slightly faster and potentially prevent this timeout issue.

DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events