Did someone found the solution to the issue? I tried with this in bitbucket-pipeline.yml
step
size: 4x
...
docker build --memory=8g --memory-swap=8g
In Dockerfile
ENV NODE_OPTIONS=--max-old-space-size=4096
But no luck. With so much resource, it stuck forever and