0

Please or Register to create posts and topics.

Problem with rxjs 6.4.0 by build prod

Hello,

I have upgrade:

"@angular-devkit/build-angular": "^0.13.6",
"@angular/cli": "^7.1.0",
"@angular/compiler-cli": "^7.2.9",

 

if I call ng build --extract-css "--prod"

I get the error:

90% chunk assets processing
<--- Last few GCs --->

[18120:000002797DF2BAE0] 186161 ms: Mark-sweep 1340.6 (1454.0) -> 1336.8 (1452.0) MB, 1643.5 / 0.0 ms (average mu = 0.143, current mu = 0.076) allocation failure scavenge might not succeed
[18120:000002797DF2BAE0] 186974 ms: Mark-sweep 1345.9 (1452.0) -> 1340.5 (1458.5) MB, 772.4 / 0.0 ms (average mu = 0.109, current mu = 0.050) allocation failure scavenge might not succeed

<--- JS stacktrace --->

==== JS stack trace =========================================

0: ExitFrame [pc: 000001E4BE650481]
Security context: 0x01a08609d9b1 <JSObject>
1: next [000001A086099591](this=0x036a7c7038a1 <Array Iterator map = 0000014836585A91>)
2: source [000000E33171A801] [C:\Users\ingo\source\repos\TipWeb6\QuickApp.Pro\ClientApp\node_modules\webpack\lib\optimize\ConcatenatedModule.js:928] [bytecode=0000024823FDC251 offset=2907](this=0x02f09c68dd61 <DependenciesBlock map = 000001CC27B56441>,0x032376d5...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

 

Does anyone have an idea what I can do?

regards Ingo

 

Hello,

The answer here on stackoverflow will help you understand what is going on and how to get around it: https://stackoverflow.com/questions/53685008/improving-production-build-time-for-angular-7-application

This github issue is also referring to this behavior https://github.com/angular/angular-cli/issues/13734
Notice that a workaround has been provided here https://github.com/angular/angular-cli/issues/5618

But before you go increasing the process memory limit let's use the latest angular cli configurations available

Update global angular cli with this command
npm uninstall -g @angular/cli
npm install -g @angular/cli@latest

Also I recommend you merge your configuration in package.json with the package versions below. These are from the script and dependency sections of the newest version of QuickApp which are in line with that of the latest versions of Angular Cli

"scripts": {
  "ng": "ng",
  "start": "run-p theme \"serve -- {@}\" --",
  "serve": "ng serve",
  "theme": "node-sass --watch src/app/assets/themes/ --output src/assets/themes/ --output-style=compressed",
  "build": "ng build",
  "test": "ng test",
  "lint": "ng lint",
  "e2e": "ng e2e"
}, "dependencies": {
  "@angular/animations": "^7.2.9",
  "@angular/cdk": "^7.3.4",
  "@angular/common": "~7.2.0",
  "@angular/compiler": "~7.2.0",
  "@angular/core": "~7.2.0",
  "@angular/flex-layout": "^7.0.0-beta.23",
  "@angular/forms": "~7.2.0",
  "@angular/material": "^7.3.4",
  "@angular/platform-browser": "~7.2.0",
  "@angular/platform-browser-dynamic": "~7.2.0",
  "@angular/router": "~7.2.0",
  "@ngu/carousel": "~1.5.5",
  "@ngx-translate/core": "^11.0.1",
  "chart.js": "^2.8.0",
  "core-js": "^2.5.4",
  "hammerjs": "^2.0.8",
  "highlight.js": "^9.15.6",
  "ng2-charts": "^2.0.3",
  "ngx-toasta": "^0.1.0",
  "rxjs": "~6.3.3",
  "tslib": "^1.9.0",
  "zone.js": "~0.8.26"
}, "devDependencies": {
  "@angular-devkit/build-angular": "~0.13.0",
  "@angular/cli": "~7.3.6",
  "@angular/compiler-cli": "~7.2.0",
  "@angular/language-service": "~7.2.0",
  "@types/node": "~8.9.4",
  "@types/jasmine": "~2.8.8",
  "@types/jasminewd2": "~2.0.3",
  "codelyzer": "~4.5.0",
  "jasmine-core": "~2.99.1",
  "jasmine-spec-reporter": "~4.2.1",
  "karma": "~4.0.0",
  "karma-chrome-launcher": "~2.2.0",
  "karma-coverage-istanbul-reporter": "~2.0.1",
  "karma-jasmine": "~1.1.2",
  "karma-jasmine-html-reporter": "^0.2.2",
  "npm-run-all": "^4.1.5",
  "protractor": "~5.4.0",
  "ts-node": "~7.0.0",
  "tslint": "~5.11.0",
  "typescript": "~3.2.2"
}

Regards,
Eben Monney

Hello Eben,

at first thanks for your help. But I have the same error with the memory. I do not know how I set the --max-old-space-size=4096 in the .csproj for published in Visual Studio. My project works fine and I still wait for the next update of  QuickApp.pro here.

regards Ingo