Why I am getting error in my cicd as OOM in GC during deserialization in my CICD Pipeline?

Viewed 25

I am working on CI pipeline in my project. My project consists of Angular 14 and ASP.NET Core 6.0 Web API. Currently when I run my pipeline for the below step, I get an error

Error: javascript OOM in GC during deserialization
##[error]Cmd.exe exited with code '-2147483645'.

Can I please know what this error message means, and why I am getting it? I also tried to increase the size value of the parameter till node --max_old_space_size=64384 but I still get that error message:

FATAL ERROR: NewSpace::Rebalance Allocation failed - JavaScript heap out of memory
##[error]Cmd.exe exited with code '134'.

Below is my yaml file till that step:

trigger: none

variables:
- name: solution
  value: 'MyApp.sln'
- name: buildPlatform
  value: 'Any CPU'
- name: buildConfiguration
  value: 'Release'
- name: "npm_config_cache"
  value: $(Pipeline.Workspace)/.npm

stages:
- stage: StartAzVMAgent
  jobs:
  - job: MsHostedAgentJobStartAzVM
    timeoutInMinutes: 0
    pool:
      vmImage: 'windows-latest'
    steps:
    - task: AzureCLI@2
      displayName: Azure CLI
      inputs:
        azureSubscription: "Az-DevOps-AgentManager"
        scriptType: ps
        scriptLocation: inlineScript
        inlineScript: |
          az --version
          az account show
          az vm start --name  MyDeployment-Agent --no-wait --resource-group MyDeployment

- stage: __default
  jobs:
  - job: Job
    timeoutInMinutes: 0
    pool:
      name: Default
      demands:
      - Use_for -equals klcloud
    steps:
     - task: Npm@1
       displayName: Install Node dependencies (packages)
       inputs:
         command: custom
         customCommand: install --save --legacy-peer-deps 
         workingDir: 'MyApp.WebUI\MyClientApp'
        
     - task: Npm@1
       displayName: Install Node dependencies (packages)
       inputs:
         command: custom
         customCommand: install sweetalert2 file-saver --legacy-peer-deps
         workingDir: 'MyApp.WebUI\MyClientApp'

    - task: CmdLine@2
      displayName: Building Client App
      inputs:
        script: node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build  --configuration production --aot --build-optimizer=true --common-chunk=true  --named-chunks=false --optimization=true --vendor-chunk=true --progress=true
        workingDirectory: 'MyApp.WebUI\MyClientApp'
        

Thank you

0 Answers
Related