-1

I am trying to build my angular application using 'ng build'. It is failing because it is running out of memory to build as I surmise from my research. I have tried several of the solutions out there with no luck. After typing 'ng build' either from VSC terminal or on DOS line, it runs for about 3 minutes during this step:

Generating ES5 bundles for differential loading...

then it fails with this error written to my angular-errors.log file:

[error] Error: Call retries were exceeded
    at ChildProcessWorker.initialize (c:\development\gems\Frontend_Serenity_A9_SLIM\Frontend_Serenity_A9\node_modules\jest-worker\build\workers\ChildProcessWorker.js:193:21)
    at ChildProcessWorker.onExit (c:\development\gems\Frontend_Serenity_A9_SLIM\Frontend_Serenity_A9\node_modules\jest-worker\build\workers\ChildProcessWorker.js:263:12)
    at ChildProcess.emit (events.js:203:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

I have tried increasing my memory as some articles/stack overflows have indicated. I tried this:

npm install -g increase-memory-limit

and then ran this command at the root of my angular project:

increase-memory-limit

to no avail. Using es5 rather than es2015 is not a solution for our app. Any help or ideas you can offer are GREATLY appreciated. I have been trying everything for a week now and am still stuck. Thanks!

package.json contents:

{
  "name": "serenity",
  "version": "9.0.0",
  "license": "PrimeNG Commercial",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "9.0.4",
    "@angular/cdk": "9.1.0",
    "@angular/common": "9.0.4",
    "@angular/compiler": "9.0.4",
    "@angular/core": "9.0.4",
    "@angular/forms": "9.0.4",
    "@angular/material": "^9.1.0",
    "@angular/platform-browser": "9.0.4",
    "@angular/platform-browser-dynamic": "9.0.4",
    "@angular/router": "9.0.4",
    "@aspnet/signalr": "^1.1.4",
    "@fullcalendar/core": "4.0.2",
    "@fullcalendar/daygrid": "4.0.1",
    "@fullcalendar/interaction": "4.0.2",
    "@fullcalendar/timegrid": "4.0.1",
    "@handsontable/angular": "^5.1.1",
    "@mdi/svg": "^5.3.45",
    "@types/leaflet-draw": "^1.0.2",
    "@types/plotly.js": "^1.50.12",
    "chart.js": "2.7.3",
    "d3": "^5.16.0",
    "font-awesome": "4.7.0",
    "handsontable": "^7.4.2",
    "intl": "1.2.5",
    "leaflet": "^1.6.0",
    "leaflet-draw": "^1.0.4",
    "leaflet-sidebar-v2": "^3.2.2",
    "leaflet.control.layers.tree": "^1.0.0",
    "leaflet.glify": "^3.0.0",
    "material-design-icons": "^3.0.1",
    "plotly.js-dist": "^1.54.1",
    "primeflex": "1.0.0",
    "primeng": "9.0.1",
    "prismjs": "1.15.0",
    "quill": "1.1.8",
    "rxjs": "6.5.4",
    "three": "^0.117.1",
    "web-animations-js": "github:angular/web-animations-js#release_pr208",
    "xlsx": "^0.16.2",
    "zone.js": "0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "0.900.4",
    "@angular/cli": "9.0.4",
    "@angular/compiler-cli": "9.0.4",
    "@angular/language-service": "9.0.4",
    "@types/jasmine": "3.5.7",
    "@types/jasminewd2": "2.0.8",
    "@types/leaflet": "^1.5.17",
    "@types/node": "12.12.29",
    "codelyzer": "5.2.1",
    "jasmine-core": "3.5.0",
    "jasmine-spec-reporter": "4.2.1",
    "karma": "4.3.0",
    "karma-chrome-launcher": "3.1.0",
    "karma-coverage-istanbul-reporter": "2.1.1",
    "karma-jasmine": "2.0.1",
    "karma-jasmine-html-reporter": "1.5.2",
    "protractor": "5.4.3",
    "ts-node": "8.3.0",
    "tslint": "5.18.0",
    "typescript": "3.7.5"
  }
}

Chris
  • 105
  • 1
  • 8
  • 1
    Does this answer your question? [Call retries were exceeded exception while ng build](https://stackoverflow.com/questions/59531305/call-retries-were-exceeded-exception-while-ng-build) – Heretic Monkey Dec 04 '20 at 18:20
  • @HereticMonkey: Thanks for responding. I have looked at this response(s) over the past week. The main issues they recommend is to upgrade to @angular/cli to be >= 8.3.22. As you can see from above, I am at 9.0.4. Then the other recommendations have to do with increasing the memory of --max_old_space_size. I ran the increase-memory-limit as shown above and it updated alot of the files in the .bin directory to have a new size of: --max-old-space-size=10240. Still not working. :(. My laptop has 32 gigs of RAM. – Chris Dec 04 '20 at 18:29
  • I suggest looking at the FAQ [“This question already has answers here” - but it does not. What can I do when I think my question's not a duplicate?](https://meta.stackoverflow.com/q/252252/215552) to see how you can be proactive by [edit]ing your question with links to existing questions and showing how the answer(s) to those questions did not help you. – Heretic Monkey Dec 04 '20 at 18:58

2 Answers2

0

Note sure if this will help in your case, but have you tried increasing the maximumError in the budgets section under configurations in the angular.json file?

John Kane
  • 4,300
  • 1
  • 24
  • 39
0

Yes, it was a memory issue and I was having a hard time getting node to change the memory limit before it built my project. I was able to get it to allocate 3 gigs and then it worked fine.

Chris
  • 105
  • 1
  • 8