Exit status 137, angular build


Our Angular build job is giving a “Exit status 137”, I think this is out of memory. So I increased the --max_old_space_size from 4096 to 6144, on a medium+ resource class, but it still fails. I’m able to build the Angular app on my local machine with max_old_space_size = 4096. The changes made to the app is relatively small and the build has been running up till now, without any problems.

My config file:

anchor_1: &job_defaults
  working_directory: ~/dir
    - image: circleci/node:10
        NODE_OPTIONS: --max_old_space_size=6144

and the job

        <<: *job_defaults
        resource_class: medium+
            - checkout
            - attach_workspace:
                at: ~/dir
            - run:
                name: set build number
                command: npm run update:version
            - run:
                name: angular-build
                command: npm run build:staging
            - persist_to_workspace:
                root: .
                    - ./dist

Can someone confirm that the NODE_OPTIONS environment variable is applied correct? I think it is rather difficult to tjeck that it is used!

Other suggestions to get back on track is very much appreciated, thanks in advance.

Best regard\Mads Mønster