Hello, I'm having a hard time deploying my react app into production environment because it returns:
yarn build yarn run v1<span>.22</span><span>.19</span> $ react-app-rewired build <span>Creating</span> an optimised production build... <span>The</span> build failed because the process exited too early. <span>This</span> probably means the system ran out <span>of</span> memory or someone called <span>`kill -9`</span> on the process. info <span>Visit</span> <span>https</span>:<span>//yarnpkg.com/en/docs/cli/run for documentation about this command.</span> error <span>Command</span> failed <span>with</span> exit code <span>1.</span>
I don't have any further information about what is causing the memory peak other than that log. This is my bitbucket pipeline file:
<span>image</span>: atlassian/<span>default</span>-<span>image</span>:<span>3</span> <span>pipelines</span>: <span>branches</span>: <span>stage</span>: #<span>STAGE</span> - <span>step</span>: <span>name</span>: <span>Build</span> docker <span>deployment</span>: <span>Staging</span> <span>services</span>: - docker <span>image</span>: <span>node</span>:<span>16</span>-alpine <span>size</span>: 2x <span>script</span>: - <span>export</span> <span>NODE_OPTIONS</span>=--max-old-space-size=<span>8192</span> - yarn install - yarn build - echo $REACT_APP_AUTH - echo $REACT_APP_MEMBERSHIP - docker login -u $DOCKER_HUB_ID -p $DOCKER_HUB_PASSWORD - docker build -t evoeccdocker/<span>membership_front</span>:stage --build-arg <span>REACT_APP_AUTH</span>=$REACT_APP_AUTH --build-arg <span>REACT_APP_MEMBERSHIP</span>=$REACT_APP_MEMBERSHIP --build-arg <span>REACT_APP_PAYMENT</span>=$REACT_APP_PAYMENT --build-arg <span>REACT_APP_APPLICATION_ID</span>=$REACT_APP_APPLICATION_ID --build-arg <span>REACT_APP_APPLICATION_KEY</span>=$REACT_APP_APPLICATION_KEY --build-arg <span>REACT_APP_TINYMCE</span>=$REACT_APP_TINYMCE --build-arg <span>REACT_APP_GOOGLE_CLIENT_ID</span>=$REACT_APP_GOOGLE_CLIENT_ID --build-arg <span>REACT_APP_GOOGLE_ANALYTICS</span>=$REACT_APP_GOOGLE_ANALYTICS --build-arg <span>REACT_APP_PAYMENT_PAGE_STORAGE_ENCRYPT_SALT</span>=$REACT_APP_PAYMENT_PAGE_STORAGE_ENCRYPT_SALT --build-arg <span>REACT_APP_PAYPAL_CLIENT_ID</span>=$REACT_APP_PAYPAL_CLIENT_ID -f ./<span>Dockerfile</span>-stage . - docker push evoeccdocker/<span>membership_front</span>:stage <span>caches</span>: - docker - nodecustom - yarn <span>master</span>: #<span>MASTER</span> - <span>step</span>: <span>name</span>: <span>Build</span> docker <span>image</span>: <span>node</span>:<span>16</span>-alpine <span>size</span>: 2x <span>deployment</span>: <span>Production</span> <span>services</span>: - docker <span>script</span>: - <span>export</span> <span>NODE_OPTIONS</span>=--max-old-space-size=<span>8192</span> - yarn install - yarn build - docker login -u $DOCKER_HUB_ID -p $DOCKER_HUB_PASSWORD - docker build -t evoeccdocker/<span>membership_front</span>:prod --build-arg <span>REACT_APP_AUTH</span>=$REACT_APP_AUTH --build-arg <span>REACT_APP_MEMBERSHIP</span>=$REACT_APP_MEMBERSHIP --build-arg <span>REACT_APP_PAYMENT</span>=$REACT_APP_PAYMENT --build-arg <span>REACT_APP_APPLICATION_ID</span>=$REACT_APP_APPLICATION_ID --build-arg <span>REACT_APP_APPLICATION_KEY</span>=$REACT_APP_APPLICATION_KEY --build-arg <span>REACT_APP_TINYMCE</span>=$REACT_APP_TINYMCE --build-arg <span>REACT_APP_GOOGLE_CLIENT_ID</span>=$REACT_APP_GOOGLE_CLIENT_ID --build-arg <span>REACT_APP_GOOGLE_ANALYTICS</span>=$REACT_APP_GOOGLE_ANALYTICS --build-arg <span>REACT_APP_PAYMENT_PAGE_STORAGE_ENCRYPT_SALT</span>=$REACT_APP_PAYMENT_PAGE_STORAGE_ENCRYPT_SALT --build-arg <span>REACT_APP_PAYPAL_CLIENT_ID</span>=$REACT_APP_PAYPAL_CLIENT_ID -f ./<span>Dockerfile</span>-prod . - docker push evoeccdocker/<span>membership_front</span>:prod <span>caches</span>: - docker - nodecustom - yarn <span>definitions</span>: <span>caches</span>: <span>nodecustom</span>: ./node_modules <span>yarn</span>: <span>/usr/</span>local/share/.<span>cache</span>/yarn
Does anyone know how to fix it or is there an easy way to discover which library or plugin is causing this peak of memory usage?
Hi @Paula Perret
Not sure if this is useful, but I found a similar question to this on the Community.
Does this answer help at all? - https://community.atlassian.com/t5/Bitbucket-questions/Re-Container-Build-exceeded-memory-limit/qaq-p/2289638/comment-id/91040#M91040
Ste
It looks like you're new here. Sign in or register to get started.