- Newest
- Most votes
- Most comments
When CodeBuild gets stuck during the npm install step, it could be due to various reasons such as connectivity issues, package registry problems, or resource constraints.
You should review the CodeBuild logs for any clues or error messages, check the AWS Service Health Dashboard for any ongoing issues or service disruptions, ensure the CodeBuild service role has the necessary permissions to access the package registry and download the required packages, try updating the NPM version, clear the NPM cache, increase timeout and resource limits for your CodeBuild project, consider using a specific NPM registry mirror.
It might be a general problem because I work with an AWS organization and have several accounts with different pipelines. Everything was working on Wednesday, July 24, but yesterday they all stopped working. Although there's nothing reported on the AWS Service Health Dashboard, here are some details:
- All pipelines have a 1-hour timeout, and they usually run in 8 minutes.
- I opened all ports to rule out network issues, but it still gets stuck.
- I tried in two different regions, N. Virginia and California, and it's the same in both.
- The role has always worked; the pipelines have been running for months. I can't think of any permissions needed to execute an npm command.
- Regarding capacity and memory, all pipelines have 3 GB memory and 2 vCPUs, which should be sufficient. Regarding the cache, since it's npm, what do you mean by cleaning it or managing it?
Reviewing each dependency in my project, I found one that was causing an issue during the download. To identify this error, I ran npm i ts-node@10.9.1 --verbose to see how far the dependency download progressed.
Relevant content
- asked 4 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
