angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.77k stars 11.97k forks source link

Build fails with JavaScript heap out of memory #13853

Closed rpvsen closed 5 years ago

rpvsen commented 5 years ago

🐞 Bug report

Command (mark with an x)

- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Description

Hi

I am trying to make build using my angular 5.0.0 project, I am getting Build Fail heap out of memory

"devDependencies": { "@angular/cli": "1.5.0", "@types/chartjs": "0.0.31", "@types/datatables.net": "^1.10.15", "@types/jasmine": "~2.5.53", "@types/jasminewd2": "^2.0.3", "@types/jquery": "^3.3.29", "@types/node": "^6.0.45", "jasmine": "~2.4.1", "jasmine-core": "~2.4.1", "karma": "^1.3.0", "karma-chrome-launcher": "^2.0.0", "karma-cli": "^1.0.1", "karma-jasmine": "^1.0.2", "karma-jasmine-html-reporter": "^0.2.2", "karma-phantomjs-launcher": "^1.0.2", "lodash": "^4.17.11", "phantomjs-prebuilt": "^2.1.7", "popper.js": "^1.12.9", "protractor": "^5.4.1", "ts-node": "^3.3.0", "tslint": "^3.15.1", "typescript": "2.4.2" }

πŸ”¬ Minimal Reproduction

Please include: commands run (including args), packages added, related code changes. ng build --prod

Package Version

"dependencies": { "@angular/animations": "^5.0.0", "@angular/common": "~5.0.0", "@angular/compiler": "~5.0.0", "@angular/compiler-cli": "~5.0.0", "@angular/core": "~5.0.0", "@angular/flex-layout": "^6.0.0-beta.18", "@angular/forms": "~5.0.0", "@angular/http": "~5.0.0", "@angular/platform-browser": "~5.0.0", "@angular/platform-browser-dynamic": "~5.0.0", "@angular/platform-server": "~5.0.0", "@angular/router": "~5.0.0", "@angular/upgrade": "~5.0.0", "@ngx-loading-bar/core": "^2.0.0", "@ngx-loading-bar/router": "^2.0.0", "@swimlane/ngx-charts": "^10.1.0", "@swimlane/ngx-graph": "^4.1.1", "angular-datatables": "^7.0.0", "angular-gridster2": "^7.1.0", "angular-in-memory-web-api": "~0.5.0", "angular-tag-cloud-module": "^2.4.0", "angular2-cookie": "^1.2.6", "angular2-justgage": "^0.3.0", "bootstrap": "^4.0.0-alpha.6", "chart.js": "^2.7.2", "chartjs-plugin-zoom": "^0.6.3", "classlist.js": "^1.1.20150312", "core-js": "^2.4.1", "cronstrue": "^1.1.0", "d3": "^5.5.0", "d3-array": "^1.2.4", "d3-brush": "^1.0.6", "d3-color": "^1.2.3", "d3-force": "^1.1.2", "d3-format": "^1.3.2", "d3-hierarchy": "^1.1.8", "d3-interpolate": "^1.3.2", "d3-scale": "^2.1.2", "d3-selection": "^1.3.2", "d3-shape": "^1.2.2", "d3-time-format": "^2.1.3", "d3-transition": "^1.1.3", "datatables.net": "^1.10.19", "datatables.net-bs4": "^1.10.19", "font-awesome": "^4.7.0", "install": "^0.10.1", "jquery": "^3.2.1", "moment": "^2.22.0", "ng-org-chart": "^1.2.0", "ng-pick-datetime": "^5.0.0-beta.15", "ng-sidebar": "^6.0.4", "ng2-auto-complete": "^0.12.0", "ng2-dnd": "^5.0.2", "ng2-drag-drop": "^3.0.2", "ng2-popover": "0.0.14", "ng2-search-filter": "^0.4.7", "ng2-toastr": "^4.1.2", "ng2-trim-directive": "^2.1.2", "ng2-truncate": "^1.3.11", "ngx-breadcrumbs": "0.0.3", "ngx-cookie-service": "^1.0.10", "ngx-json-viewer": "^2.4.0", "ngx-pagination": "^3.0.3", "npm": "^5.5.1", "package.json": "^2.0.1", "rxjs": "^5.5.0", "web-animations-js": "^2.3.1", "zone.js": "^0.8.4" }

"devDependencies": { "@angular/cli": "1.5.0", "@types/chartjs": "0.0.31", "@types/datatables.net": "^1.10.15", "@types/jasmine": "~2.5.53", "@types/jasminewd2": "^2.0.3", "@types/jquery": "^3.3.29", "@types/node": "^6.0.45", "jasmine": "~2.4.1", "jasmine-core": "~2.4.1", "karma": "^1.3.0", "karma-chrome-launcher": "^2.0.0", "karma-cli": "^1.0.1", "karma-jasmine": "^1.0.2", "karma-jasmine-html-reporter": "^0.2.2", "karma-phantomjs-launcher": "^1.0.2", "lodash": "^4.17.11", "phantomjs-prebuilt": "^2.1.7", "popper.js": "^1.12.9", "protractor": "^5.4.1", "ts-node": "^3.3.0", "tslint": "^3.15.1", "typescript": "2.4.2" }

πŸ”₯ Exception or Error




92% chunk asset optimization
<--- Last few GCs --->

[15660:000001AA45530090]   207204 ms: Mark-sweep 1338.7 (1450.5) -> 1329.4 (1454.0) MB, 987.5 / 0.0 ms  (average mu = 0.171, current mu = 0.112) allocation failure scavenge might not succeed
[15660:000001AA45530090]   208309 ms: Mark-sweep 1342.0 (1454.0) -> 1332.7 (1457.5) MB, 988.6 / 0.0 ms  (average mu = 0.140, current mu = 0.106) allocation failure scavenge might not succeed

<--- JS stacktrace --->

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

    0: ExitFrame [pc: 0000038EE0ADC5C1]
    1: StubFrame [pc: 0000038EE0ADDB86]
Security context: 0x01ea01b9e6e1 
    2: read_word(aka read_word) [0000018B1FE77D81] [0x02f95f3826f1 :~2276] [pc=0000038EE4532D92](this=0x02f95f3826f1 )
    3: next_token [0000018B1FE77DC1] [0x02f95f3826f1 :~2296] [pc=0000038EE4566BCA](this=0x018b1fe77e01 ,force_regexp=0x02f95f3826f1 

🌍 Your Environment




Angular CLI: 7.3.1
Node: 10.15.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.13.1
@angular-devkit/core         7.3.1
@angular-devkit/schematics   7.3.1
@schematics/angular          7.3.1
@schematics/update           0.13.1
rxjs                         6.3.3
typescript                   3.2.4

Anything else relevant?

angular-automatic-lock-bot[bot] commented 5 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.