title: GitLab CI Pipeline Job gives error JavaScript heap out of memory
body: <p>We have a WordPress plugin written in JS with the help of the tool <code>wp-reactivate</code>.</p>
  <p>Our goal is to make a GitLab CI Pipeline that increases the version in all places, builds the project and deploys it to the WordPress.org SVN repository. So far, the SVN deployment does work, incrementing the version number is unimplemented yet, but we have a problem building the project. The GitLab CI Runner refuses to finish the process since it ran out of available memory.</p>
  <p><a href="https://i.stack.imgur.com/k7Gon.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k7Gon.png" alt="The error message" /></a></p>
  <p>We have already tried (with no effect):</p>
  <ul>
  <li>Setting <code>GENERATE_SOURCEMAP=false</code></li>
  <li>Setting <code>NODE_OPTIONS=&quot;--max_old_space_size=8192&quot;</code></li>
  <li>Running <code>node --max-old-space-size=8192</code></li>
  </ul>
  <p>Our <code>.gitlab-ci.yml</code> file:</p>
  <pre class="lang-yaml prettyprint-override"><code>stages:
    - build
    - deploy
  
  default:
    image: node
  
  BuildApp:
    stage: build
    before_script:
      - GENERATE_SOURCEMAP=false
      - NODE_OPTIONS=\&quot;--max_old_space_size=8192\&quot;
      - node --max-old-space-size=8192
    script:
      - yarn
      - yarn prod
  
  PluginSVN:
    stage: deploy
    before_script:
      - apt-get install subversion
      - curl -o /usr/bin/deploy.sh https://git-cdn.e15r.co/open-source/wp-org-plugin-deploy/raw/master/scripts/deploy.sh
      - chmod +x /usr/bin/deploy.sh
    script: /usr/bin/deploy.sh
    when: on_success
  </code></pre>
  <p>Is there any way to increase the amount of available memory, or reduce the amount of memory required for building the project?</p>