UglifyJSPlugin Out of memeory error while building
![Multi tool use Multi tool use](http://sgv.ssvwv.com/sg/ssvwvcomimagb.png)
Multi tool use
I have an angular 6 application I need to build I get the following error when I run. There a way to increase the memory?
ng build --configuration=dev
Your global Angular CLI version (7.1.4) is greater than your local
version (6.2.5). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
92% chunk asset optimization UglifyJSPlugin
<--- Last few GCs --->
[2404:000001F20242CAA0] 153171 ms: Mark-sweep 1340.0 (1440.2) -> 1335.3 (1456.2) MB, 2314.0 / 0.0 ms (average mu = 0.090, current mu = 0.006) allocation failure scavenge might not succeed
[2404:000001F20242CAA0] 155181 ms: Mark-sweep 1335.4 (1456.2) -> 1335.3 (1456.2) MB, 2007.9 / 0.0 ms (average mu = 0.047, current mu = 0.001) allocation failure GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0000036CD545C5C1]
1: StubFrame [pc: 0000036CD7BB82E2]
Security context: 0x01275d09e6e1 <JSObject>
2: add_parameter [00000281CDD2DF79] [0x032bb19026f1 <undefined>:2932] [bytecode=000003B0795083A1 offset=69](this=0x0281cdd2df31 <Object map = 00000253AF59D799>,token=0x0281cdd2e139 <AST_Token map = 00000253AF59DED1>)
3: binding_element(aka binding_element) [000002B7B84FEBB1] [0x032bb19026f1 <undefined>:~3039]...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF7E55C121A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4810
2: 00007FF7E559A5B6 node::MakeCallback+4518
3: 00007FF7E559AFA0 node_module_register+2160
4: 00007FF7E582B3EE v8::internal::FatalProcessOutOfMemory+846
5: 00007FF7E582B31F v8::internal::FatalProcessOutOfMemory+639
6: 00007FF7E5D69304 v8::internal::Heap::MaxHeapGrowingFactor+11476
7: 00007FF7E5D5FA67 v8::internal::ScavengeJob::operator=+25543
8: 00007FF7E5D5DFDC v8::internal::ScavengeJob::operator=+18748
9: 00007FF7E5D66F57 v8::internal::Heap::MaxHeapGrowingFactor+2343
10: 00007FF7E5D66FD6 v8::internal::Heap::MaxHeapGrowingFactor+2470
11: 00007FF7E5909C08 v8::internal::Factory::AllocateRawArray+56
12: 00007FF7E590FF0A v8::internal::Factory::NewTransitionArray+58
13: 00007FF7E5E0F754 v8::internal::CodeStubAssembler::InitializeFunctionContext+27076
14: 00007FF7E5B33AAE v8::internal::JSReceiver::GetOwnPropertyDescriptor+17822
15: 00007FF7E5B33C06 v8::internal::JSReceiver::GetOwnPropertyDescriptor+18166
16: 00007FF7E5B35DBB v8::internal::JSReceiver::GetOwnPropertyDescriptor+26795
17: 00007FF7E5B24B64 v8::internal::JSReceiver::class_name+4228
18: 00007FF7E5B351A9 v8::internal::JSReceiver::GetOwnPropertyDescriptor+23705
19: 00007FF7E59FC7CE v8::internal::LookupIterator::PrepareTransitionToDataProperty+478
20: 00007FF7E5B28CD1 v8::internal::JSReceiver::class_name+20977
21: 00007FF7E58F9FD1 v8::internal::wasm::WasmCodeManager::LookupCode+18929
22: 00007FF7E58FD068 v8::internal::wasm::WasmCodeManager::LookupCode+31368
23: 0000036CD545C5C1
package.json
{
"name": "My.Web.Portal",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --configuration=dev",
"build": "ng build --configuration=dev",
"build:ssr": "npm run build -- --app=ssr --output-hashing=media",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"bundle-report": "webpack-bundle-analyzer dist/stats.json"
},
"private": true,
"dependencies": {
"@angular/animations": "6.1.10",
"@angular/cdk": "^6.4.7",
"@angular/common": "6.1.10",
"@angular/compiler": "6.1.10",
"@angular/core": "6.1.10",
"@angular/forms": "6.1.10",
"@angular/http": "6.1.10",
"@angular/material": "^6.4.7",
"@angular/platform-browser": "6.1.10",
"@angular/platform-browser-dynamic": "6.1.10",
"@angular/platform-server": "6.1.10",
"@angular/router": "6.1.10",
"@ngrx/effects": "^5.2.0",
"@ngrx/store": "^5.2.0",
"@ngrx/store-devtools": "^5.2.0",
"@nguniversal/module-map-ngfactory-loader": "^5.0.0",
"angular-bootstrap-datetimepicker": "^2.2.1",
"angular-font-awesome": "^3.1.2",
"angular-moment": "^1.3.0",
"applicationinsights-js": "^1.0.20",
"aspnet-prerendering": "^3.0.1",
"bootstrap": "^4.1.3",
"core-js": "^2.4.1",
"devextreme": "^18.2.3",
"devextreme-angular": "^18.2.3",
"font-awesome": "^4.7.0",
"fullcalendar-scheduler": "^1.9.4",
"guid-typescript": "^1.0.9",
"http-status-codes": "^1.3.0",
"igniteui-angular": "5.3.1",
"jquery": "^3.3.1",
"jszip": "^3.1.5",
"lodash": "^4.17.11",
"microsoft-adal-angular6": "^1.0.0",
"moment": "^2.22.2",
"mydatepicker": "^2.6.6",
"ng-fullcalendar": "^1.6.2",
"ng2-scroll-to-el": "^1.2.1",
"ngx-joyride": "^2.2.1",
"ngx-spinner": "^2.0.1",
"ngx-toastr": "^9.1.1",
"open-iconic": "^1.1.1",
"popper.js": "^1.14.4",
"rxjs": "^6.3.3",
"rxjs-compat": "^6.3.3",
"videogular2": "^6.3.0",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.8.6",
"@angular/cli": "6.2.5",
"@angular/compiler-cli": "6.1.10",
"@angular/language-service": "6.1.10",
"@types/applicationinsights-js": "^1.0.2",
"@types/jasmine": "^2.8.9",
"@types/jasminewd2": "^2.0.5",
"@types/jquery": "^3.3.22",
"@types/lodash": "^4.14.118",
"@types/node": "^6.14.0",
"awesome-typescript-loader": "^5.2.1",
"codelyzer": "^4.5.0",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^3.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.4.3",
"karma-jasmine": "^1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.1",
"source-map-explorer": "^1.6.0",
"source-map-loader": "^0.2.4",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "^2.9.2",
"webpack": "^4.23.1",
"webpack-bundle-analyzer": "^3.0.3"
},
"optionalDependencies": {
"node-sass": "^4.9.0"
}
}
angular.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"My.Web.Portal": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"progress": true,
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets"
],
"styles": [
"node_modules/font-awesome/css/font-awesome.css",
"node_modules/videogular2/fonts/videogular.css",
"node_modules/devextreme/dist/css/dx.common.css",
"node_modules/devextreme/dist/css/dx.light.css",
"node_modules/ngx-toastr/toastr.css",
"src/styles.css"
],
"scripts": [
"node_modules/hammerjs/hammer.min.js",
"node_modules/popper.js/dist/umd/popper.js",
"src/app.js"
]
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
},
"deploy": {
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.deploy.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false
},
"dev": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"aot": true,
"buildOptimizer": true,
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.dev.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "My.Web.Portal:build"
},
"configurations": {
"production": {
"browserTarget": "My.Web.Portal:build:production"
},
"deploy": {
"browserTarget": "My.Web.Portal:build:deploy"
},
"dev": {
"browserTarget": "My.Web.Portal:build:dev"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "My.Web.Portal:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"node_modules/hammerjs/hammer.min.js",
"src/app.js"
],
"styles": [
"node_modules/font-awesome/css/font-awesome.css",
"src/styles.css"
],
"assets": [
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"My.Web.Portal-e2e": {
"root": "e2e",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "My.Web.Portal:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "My.Web.Portal",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "css"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
}
angular webpack angular-cli
add a comment |
I have an angular 6 application I need to build I get the following error when I run. There a way to increase the memory?
ng build --configuration=dev
Your global Angular CLI version (7.1.4) is greater than your local
version (6.2.5). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
92% chunk asset optimization UglifyJSPlugin
<--- Last few GCs --->
[2404:000001F20242CAA0] 153171 ms: Mark-sweep 1340.0 (1440.2) -> 1335.3 (1456.2) MB, 2314.0 / 0.0 ms (average mu = 0.090, current mu = 0.006) allocation failure scavenge might not succeed
[2404:000001F20242CAA0] 155181 ms: Mark-sweep 1335.4 (1456.2) -> 1335.3 (1456.2) MB, 2007.9 / 0.0 ms (average mu = 0.047, current mu = 0.001) allocation failure GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0000036CD545C5C1]
1: StubFrame [pc: 0000036CD7BB82E2]
Security context: 0x01275d09e6e1 <JSObject>
2: add_parameter [00000281CDD2DF79] [0x032bb19026f1 <undefined>:2932] [bytecode=000003B0795083A1 offset=69](this=0x0281cdd2df31 <Object map = 00000253AF59D799>,token=0x0281cdd2e139 <AST_Token map = 00000253AF59DED1>)
3: binding_element(aka binding_element) [000002B7B84FEBB1] [0x032bb19026f1 <undefined>:~3039]...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF7E55C121A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4810
2: 00007FF7E559A5B6 node::MakeCallback+4518
3: 00007FF7E559AFA0 node_module_register+2160
4: 00007FF7E582B3EE v8::internal::FatalProcessOutOfMemory+846
5: 00007FF7E582B31F v8::internal::FatalProcessOutOfMemory+639
6: 00007FF7E5D69304 v8::internal::Heap::MaxHeapGrowingFactor+11476
7: 00007FF7E5D5FA67 v8::internal::ScavengeJob::operator=+25543
8: 00007FF7E5D5DFDC v8::internal::ScavengeJob::operator=+18748
9: 00007FF7E5D66F57 v8::internal::Heap::MaxHeapGrowingFactor+2343
10: 00007FF7E5D66FD6 v8::internal::Heap::MaxHeapGrowingFactor+2470
11: 00007FF7E5909C08 v8::internal::Factory::AllocateRawArray+56
12: 00007FF7E590FF0A v8::internal::Factory::NewTransitionArray+58
13: 00007FF7E5E0F754 v8::internal::CodeStubAssembler::InitializeFunctionContext+27076
14: 00007FF7E5B33AAE v8::internal::JSReceiver::GetOwnPropertyDescriptor+17822
15: 00007FF7E5B33C06 v8::internal::JSReceiver::GetOwnPropertyDescriptor+18166
16: 00007FF7E5B35DBB v8::internal::JSReceiver::GetOwnPropertyDescriptor+26795
17: 00007FF7E5B24B64 v8::internal::JSReceiver::class_name+4228
18: 00007FF7E5B351A9 v8::internal::JSReceiver::GetOwnPropertyDescriptor+23705
19: 00007FF7E59FC7CE v8::internal::LookupIterator::PrepareTransitionToDataProperty+478
20: 00007FF7E5B28CD1 v8::internal::JSReceiver::class_name+20977
21: 00007FF7E58F9FD1 v8::internal::wasm::WasmCodeManager::LookupCode+18929
22: 00007FF7E58FD068 v8::internal::wasm::WasmCodeManager::LookupCode+31368
23: 0000036CD545C5C1
package.json
{
"name": "My.Web.Portal",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --configuration=dev",
"build": "ng build --configuration=dev",
"build:ssr": "npm run build -- --app=ssr --output-hashing=media",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"bundle-report": "webpack-bundle-analyzer dist/stats.json"
},
"private": true,
"dependencies": {
"@angular/animations": "6.1.10",
"@angular/cdk": "^6.4.7",
"@angular/common": "6.1.10",
"@angular/compiler": "6.1.10",
"@angular/core": "6.1.10",
"@angular/forms": "6.1.10",
"@angular/http": "6.1.10",
"@angular/material": "^6.4.7",
"@angular/platform-browser": "6.1.10",
"@angular/platform-browser-dynamic": "6.1.10",
"@angular/platform-server": "6.1.10",
"@angular/router": "6.1.10",
"@ngrx/effects": "^5.2.0",
"@ngrx/store": "^5.2.0",
"@ngrx/store-devtools": "^5.2.0",
"@nguniversal/module-map-ngfactory-loader": "^5.0.0",
"angular-bootstrap-datetimepicker": "^2.2.1",
"angular-font-awesome": "^3.1.2",
"angular-moment": "^1.3.0",
"applicationinsights-js": "^1.0.20",
"aspnet-prerendering": "^3.0.1",
"bootstrap": "^4.1.3",
"core-js": "^2.4.1",
"devextreme": "^18.2.3",
"devextreme-angular": "^18.2.3",
"font-awesome": "^4.7.0",
"fullcalendar-scheduler": "^1.9.4",
"guid-typescript": "^1.0.9",
"http-status-codes": "^1.3.0",
"igniteui-angular": "5.3.1",
"jquery": "^3.3.1",
"jszip": "^3.1.5",
"lodash": "^4.17.11",
"microsoft-adal-angular6": "^1.0.0",
"moment": "^2.22.2",
"mydatepicker": "^2.6.6",
"ng-fullcalendar": "^1.6.2",
"ng2-scroll-to-el": "^1.2.1",
"ngx-joyride": "^2.2.1",
"ngx-spinner": "^2.0.1",
"ngx-toastr": "^9.1.1",
"open-iconic": "^1.1.1",
"popper.js": "^1.14.4",
"rxjs": "^6.3.3",
"rxjs-compat": "^6.3.3",
"videogular2": "^6.3.0",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.8.6",
"@angular/cli": "6.2.5",
"@angular/compiler-cli": "6.1.10",
"@angular/language-service": "6.1.10",
"@types/applicationinsights-js": "^1.0.2",
"@types/jasmine": "^2.8.9",
"@types/jasminewd2": "^2.0.5",
"@types/jquery": "^3.3.22",
"@types/lodash": "^4.14.118",
"@types/node": "^6.14.0",
"awesome-typescript-loader": "^5.2.1",
"codelyzer": "^4.5.0",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^3.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.4.3",
"karma-jasmine": "^1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.1",
"source-map-explorer": "^1.6.0",
"source-map-loader": "^0.2.4",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "^2.9.2",
"webpack": "^4.23.1",
"webpack-bundle-analyzer": "^3.0.3"
},
"optionalDependencies": {
"node-sass": "^4.9.0"
}
}
angular.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"My.Web.Portal": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"progress": true,
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets"
],
"styles": [
"node_modules/font-awesome/css/font-awesome.css",
"node_modules/videogular2/fonts/videogular.css",
"node_modules/devextreme/dist/css/dx.common.css",
"node_modules/devextreme/dist/css/dx.light.css",
"node_modules/ngx-toastr/toastr.css",
"src/styles.css"
],
"scripts": [
"node_modules/hammerjs/hammer.min.js",
"node_modules/popper.js/dist/umd/popper.js",
"src/app.js"
]
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
},
"deploy": {
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.deploy.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false
},
"dev": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"aot": true,
"buildOptimizer": true,
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.dev.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "My.Web.Portal:build"
},
"configurations": {
"production": {
"browserTarget": "My.Web.Portal:build:production"
},
"deploy": {
"browserTarget": "My.Web.Portal:build:deploy"
},
"dev": {
"browserTarget": "My.Web.Portal:build:dev"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "My.Web.Portal:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"node_modules/hammerjs/hammer.min.js",
"src/app.js"
],
"styles": [
"node_modules/font-awesome/css/font-awesome.css",
"src/styles.css"
],
"assets": [
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"My.Web.Portal-e2e": {
"root": "e2e",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "My.Web.Portal:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "My.Web.Portal",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "css"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
}
angular webpack angular-cli
I used to get this error in my node js service. I fixed it by modifying the loops that I had used in my code. The error stated it is from a memcached loop. So i simply modified that loop and my issue was fixed
– node_man
Jan 1 at 5:15
temporarily you can run your application with a flag --max-old-space-size=4000 where 4000 is the RAM in mb. try this and let me know if it helps you.
– node_man
Jan 1 at 5:18
@pravinnavle the error I am getting is during build time when i run "ng build" not while running the application it is happening at uglifyjs stage.
– kumar
Jan 1 at 5:25
add a comment |
I have an angular 6 application I need to build I get the following error when I run. There a way to increase the memory?
ng build --configuration=dev
Your global Angular CLI version (7.1.4) is greater than your local
version (6.2.5). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
92% chunk asset optimization UglifyJSPlugin
<--- Last few GCs --->
[2404:000001F20242CAA0] 153171 ms: Mark-sweep 1340.0 (1440.2) -> 1335.3 (1456.2) MB, 2314.0 / 0.0 ms (average mu = 0.090, current mu = 0.006) allocation failure scavenge might not succeed
[2404:000001F20242CAA0] 155181 ms: Mark-sweep 1335.4 (1456.2) -> 1335.3 (1456.2) MB, 2007.9 / 0.0 ms (average mu = 0.047, current mu = 0.001) allocation failure GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0000036CD545C5C1]
1: StubFrame [pc: 0000036CD7BB82E2]
Security context: 0x01275d09e6e1 <JSObject>
2: add_parameter [00000281CDD2DF79] [0x032bb19026f1 <undefined>:2932] [bytecode=000003B0795083A1 offset=69](this=0x0281cdd2df31 <Object map = 00000253AF59D799>,token=0x0281cdd2e139 <AST_Token map = 00000253AF59DED1>)
3: binding_element(aka binding_element) [000002B7B84FEBB1] [0x032bb19026f1 <undefined>:~3039]...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF7E55C121A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4810
2: 00007FF7E559A5B6 node::MakeCallback+4518
3: 00007FF7E559AFA0 node_module_register+2160
4: 00007FF7E582B3EE v8::internal::FatalProcessOutOfMemory+846
5: 00007FF7E582B31F v8::internal::FatalProcessOutOfMemory+639
6: 00007FF7E5D69304 v8::internal::Heap::MaxHeapGrowingFactor+11476
7: 00007FF7E5D5FA67 v8::internal::ScavengeJob::operator=+25543
8: 00007FF7E5D5DFDC v8::internal::ScavengeJob::operator=+18748
9: 00007FF7E5D66F57 v8::internal::Heap::MaxHeapGrowingFactor+2343
10: 00007FF7E5D66FD6 v8::internal::Heap::MaxHeapGrowingFactor+2470
11: 00007FF7E5909C08 v8::internal::Factory::AllocateRawArray+56
12: 00007FF7E590FF0A v8::internal::Factory::NewTransitionArray+58
13: 00007FF7E5E0F754 v8::internal::CodeStubAssembler::InitializeFunctionContext+27076
14: 00007FF7E5B33AAE v8::internal::JSReceiver::GetOwnPropertyDescriptor+17822
15: 00007FF7E5B33C06 v8::internal::JSReceiver::GetOwnPropertyDescriptor+18166
16: 00007FF7E5B35DBB v8::internal::JSReceiver::GetOwnPropertyDescriptor+26795
17: 00007FF7E5B24B64 v8::internal::JSReceiver::class_name+4228
18: 00007FF7E5B351A9 v8::internal::JSReceiver::GetOwnPropertyDescriptor+23705
19: 00007FF7E59FC7CE v8::internal::LookupIterator::PrepareTransitionToDataProperty+478
20: 00007FF7E5B28CD1 v8::internal::JSReceiver::class_name+20977
21: 00007FF7E58F9FD1 v8::internal::wasm::WasmCodeManager::LookupCode+18929
22: 00007FF7E58FD068 v8::internal::wasm::WasmCodeManager::LookupCode+31368
23: 0000036CD545C5C1
package.json
{
"name": "My.Web.Portal",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --configuration=dev",
"build": "ng build --configuration=dev",
"build:ssr": "npm run build -- --app=ssr --output-hashing=media",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"bundle-report": "webpack-bundle-analyzer dist/stats.json"
},
"private": true,
"dependencies": {
"@angular/animations": "6.1.10",
"@angular/cdk": "^6.4.7",
"@angular/common": "6.1.10",
"@angular/compiler": "6.1.10",
"@angular/core": "6.1.10",
"@angular/forms": "6.1.10",
"@angular/http": "6.1.10",
"@angular/material": "^6.4.7",
"@angular/platform-browser": "6.1.10",
"@angular/platform-browser-dynamic": "6.1.10",
"@angular/platform-server": "6.1.10",
"@angular/router": "6.1.10",
"@ngrx/effects": "^5.2.0",
"@ngrx/store": "^5.2.0",
"@ngrx/store-devtools": "^5.2.0",
"@nguniversal/module-map-ngfactory-loader": "^5.0.0",
"angular-bootstrap-datetimepicker": "^2.2.1",
"angular-font-awesome": "^3.1.2",
"angular-moment": "^1.3.0",
"applicationinsights-js": "^1.0.20",
"aspnet-prerendering": "^3.0.1",
"bootstrap": "^4.1.3",
"core-js": "^2.4.1",
"devextreme": "^18.2.3",
"devextreme-angular": "^18.2.3",
"font-awesome": "^4.7.0",
"fullcalendar-scheduler": "^1.9.4",
"guid-typescript": "^1.0.9",
"http-status-codes": "^1.3.0",
"igniteui-angular": "5.3.1",
"jquery": "^3.3.1",
"jszip": "^3.1.5",
"lodash": "^4.17.11",
"microsoft-adal-angular6": "^1.0.0",
"moment": "^2.22.2",
"mydatepicker": "^2.6.6",
"ng-fullcalendar": "^1.6.2",
"ng2-scroll-to-el": "^1.2.1",
"ngx-joyride": "^2.2.1",
"ngx-spinner": "^2.0.1",
"ngx-toastr": "^9.1.1",
"open-iconic": "^1.1.1",
"popper.js": "^1.14.4",
"rxjs": "^6.3.3",
"rxjs-compat": "^6.3.3",
"videogular2": "^6.3.0",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.8.6",
"@angular/cli": "6.2.5",
"@angular/compiler-cli": "6.1.10",
"@angular/language-service": "6.1.10",
"@types/applicationinsights-js": "^1.0.2",
"@types/jasmine": "^2.8.9",
"@types/jasminewd2": "^2.0.5",
"@types/jquery": "^3.3.22",
"@types/lodash": "^4.14.118",
"@types/node": "^6.14.0",
"awesome-typescript-loader": "^5.2.1",
"codelyzer": "^4.5.0",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^3.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.4.3",
"karma-jasmine": "^1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.1",
"source-map-explorer": "^1.6.0",
"source-map-loader": "^0.2.4",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "^2.9.2",
"webpack": "^4.23.1",
"webpack-bundle-analyzer": "^3.0.3"
},
"optionalDependencies": {
"node-sass": "^4.9.0"
}
}
angular.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"My.Web.Portal": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"progress": true,
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets"
],
"styles": [
"node_modules/font-awesome/css/font-awesome.css",
"node_modules/videogular2/fonts/videogular.css",
"node_modules/devextreme/dist/css/dx.common.css",
"node_modules/devextreme/dist/css/dx.light.css",
"node_modules/ngx-toastr/toastr.css",
"src/styles.css"
],
"scripts": [
"node_modules/hammerjs/hammer.min.js",
"node_modules/popper.js/dist/umd/popper.js",
"src/app.js"
]
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
},
"deploy": {
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.deploy.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false
},
"dev": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"aot": true,
"buildOptimizer": true,
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.dev.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "My.Web.Portal:build"
},
"configurations": {
"production": {
"browserTarget": "My.Web.Portal:build:production"
},
"deploy": {
"browserTarget": "My.Web.Portal:build:deploy"
},
"dev": {
"browserTarget": "My.Web.Portal:build:dev"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "My.Web.Portal:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"node_modules/hammerjs/hammer.min.js",
"src/app.js"
],
"styles": [
"node_modules/font-awesome/css/font-awesome.css",
"src/styles.css"
],
"assets": [
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"My.Web.Portal-e2e": {
"root": "e2e",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "My.Web.Portal:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "My.Web.Portal",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "css"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
}
angular webpack angular-cli
I have an angular 6 application I need to build I get the following error when I run. There a way to increase the memory?
ng build --configuration=dev
Your global Angular CLI version (7.1.4) is greater than your local
version (6.2.5). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
92% chunk asset optimization UglifyJSPlugin
<--- Last few GCs --->
[2404:000001F20242CAA0] 153171 ms: Mark-sweep 1340.0 (1440.2) -> 1335.3 (1456.2) MB, 2314.0 / 0.0 ms (average mu = 0.090, current mu = 0.006) allocation failure scavenge might not succeed
[2404:000001F20242CAA0] 155181 ms: Mark-sweep 1335.4 (1456.2) -> 1335.3 (1456.2) MB, 2007.9 / 0.0 ms (average mu = 0.047, current mu = 0.001) allocation failure GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0000036CD545C5C1]
1: StubFrame [pc: 0000036CD7BB82E2]
Security context: 0x01275d09e6e1 <JSObject>
2: add_parameter [00000281CDD2DF79] [0x032bb19026f1 <undefined>:2932] [bytecode=000003B0795083A1 offset=69](this=0x0281cdd2df31 <Object map = 00000253AF59D799>,token=0x0281cdd2e139 <AST_Token map = 00000253AF59DED1>)
3: binding_element(aka binding_element) [000002B7B84FEBB1] [0x032bb19026f1 <undefined>:~3039]...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF7E55C121A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4810
2: 00007FF7E559A5B6 node::MakeCallback+4518
3: 00007FF7E559AFA0 node_module_register+2160
4: 00007FF7E582B3EE v8::internal::FatalProcessOutOfMemory+846
5: 00007FF7E582B31F v8::internal::FatalProcessOutOfMemory+639
6: 00007FF7E5D69304 v8::internal::Heap::MaxHeapGrowingFactor+11476
7: 00007FF7E5D5FA67 v8::internal::ScavengeJob::operator=+25543
8: 00007FF7E5D5DFDC v8::internal::ScavengeJob::operator=+18748
9: 00007FF7E5D66F57 v8::internal::Heap::MaxHeapGrowingFactor+2343
10: 00007FF7E5D66FD6 v8::internal::Heap::MaxHeapGrowingFactor+2470
11: 00007FF7E5909C08 v8::internal::Factory::AllocateRawArray+56
12: 00007FF7E590FF0A v8::internal::Factory::NewTransitionArray+58
13: 00007FF7E5E0F754 v8::internal::CodeStubAssembler::InitializeFunctionContext+27076
14: 00007FF7E5B33AAE v8::internal::JSReceiver::GetOwnPropertyDescriptor+17822
15: 00007FF7E5B33C06 v8::internal::JSReceiver::GetOwnPropertyDescriptor+18166
16: 00007FF7E5B35DBB v8::internal::JSReceiver::GetOwnPropertyDescriptor+26795
17: 00007FF7E5B24B64 v8::internal::JSReceiver::class_name+4228
18: 00007FF7E5B351A9 v8::internal::JSReceiver::GetOwnPropertyDescriptor+23705
19: 00007FF7E59FC7CE v8::internal::LookupIterator::PrepareTransitionToDataProperty+478
20: 00007FF7E5B28CD1 v8::internal::JSReceiver::class_name+20977
21: 00007FF7E58F9FD1 v8::internal::wasm::WasmCodeManager::LookupCode+18929
22: 00007FF7E58FD068 v8::internal::wasm::WasmCodeManager::LookupCode+31368
23: 0000036CD545C5C1
package.json
{
"name": "My.Web.Portal",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --configuration=dev",
"build": "ng build --configuration=dev",
"build:ssr": "npm run build -- --app=ssr --output-hashing=media",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"bundle-report": "webpack-bundle-analyzer dist/stats.json"
},
"private": true,
"dependencies": {
"@angular/animations": "6.1.10",
"@angular/cdk": "^6.4.7",
"@angular/common": "6.1.10",
"@angular/compiler": "6.1.10",
"@angular/core": "6.1.10",
"@angular/forms": "6.1.10",
"@angular/http": "6.1.10",
"@angular/material": "^6.4.7",
"@angular/platform-browser": "6.1.10",
"@angular/platform-browser-dynamic": "6.1.10",
"@angular/platform-server": "6.1.10",
"@angular/router": "6.1.10",
"@ngrx/effects": "^5.2.0",
"@ngrx/store": "^5.2.0",
"@ngrx/store-devtools": "^5.2.0",
"@nguniversal/module-map-ngfactory-loader": "^5.0.0",
"angular-bootstrap-datetimepicker": "^2.2.1",
"angular-font-awesome": "^3.1.2",
"angular-moment": "^1.3.0",
"applicationinsights-js": "^1.0.20",
"aspnet-prerendering": "^3.0.1",
"bootstrap": "^4.1.3",
"core-js": "^2.4.1",
"devextreme": "^18.2.3",
"devextreme-angular": "^18.2.3",
"font-awesome": "^4.7.0",
"fullcalendar-scheduler": "^1.9.4",
"guid-typescript": "^1.0.9",
"http-status-codes": "^1.3.0",
"igniteui-angular": "5.3.1",
"jquery": "^3.3.1",
"jszip": "^3.1.5",
"lodash": "^4.17.11",
"microsoft-adal-angular6": "^1.0.0",
"moment": "^2.22.2",
"mydatepicker": "^2.6.6",
"ng-fullcalendar": "^1.6.2",
"ng2-scroll-to-el": "^1.2.1",
"ngx-joyride": "^2.2.1",
"ngx-spinner": "^2.0.1",
"ngx-toastr": "^9.1.1",
"open-iconic": "^1.1.1",
"popper.js": "^1.14.4",
"rxjs": "^6.3.3",
"rxjs-compat": "^6.3.3",
"videogular2": "^6.3.0",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.8.6",
"@angular/cli": "6.2.5",
"@angular/compiler-cli": "6.1.10",
"@angular/language-service": "6.1.10",
"@types/applicationinsights-js": "^1.0.2",
"@types/jasmine": "^2.8.9",
"@types/jasminewd2": "^2.0.5",
"@types/jquery": "^3.3.22",
"@types/lodash": "^4.14.118",
"@types/node": "^6.14.0",
"awesome-typescript-loader": "^5.2.1",
"codelyzer": "^4.5.0",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^3.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.4.3",
"karma-jasmine": "^1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.1",
"source-map-explorer": "^1.6.0",
"source-map-loader": "^0.2.4",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "^2.9.2",
"webpack": "^4.23.1",
"webpack-bundle-analyzer": "^3.0.3"
},
"optionalDependencies": {
"node-sass": "^4.9.0"
}
}
angular.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"My.Web.Portal": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"progress": true,
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets"
],
"styles": [
"node_modules/font-awesome/css/font-awesome.css",
"node_modules/videogular2/fonts/videogular.css",
"node_modules/devextreme/dist/css/dx.common.css",
"node_modules/devextreme/dist/css/dx.light.css",
"node_modules/ngx-toastr/toastr.css",
"src/styles.css"
],
"scripts": [
"node_modules/hammerjs/hammer.min.js",
"node_modules/popper.js/dist/umd/popper.js",
"src/app.js"
]
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
},
"deploy": {
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.deploy.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false
},
"dev": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"aot": true,
"buildOptimizer": true,
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.dev.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "My.Web.Portal:build"
},
"configurations": {
"production": {
"browserTarget": "My.Web.Portal:build:production"
},
"deploy": {
"browserTarget": "My.Web.Portal:build:deploy"
},
"dev": {
"browserTarget": "My.Web.Portal:build:dev"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "My.Web.Portal:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"node_modules/hammerjs/hammer.min.js",
"src/app.js"
],
"styles": [
"node_modules/font-awesome/css/font-awesome.css",
"src/styles.css"
],
"assets": [
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"My.Web.Portal-e2e": {
"root": "e2e",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "My.Web.Portal:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "My.Web.Portal",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "css"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
}
angular webpack angular-cli
angular webpack angular-cli
asked Jan 1 at 4:55
kumarkumar
1,51022551
1,51022551
I used to get this error in my node js service. I fixed it by modifying the loops that I had used in my code. The error stated it is from a memcached loop. So i simply modified that loop and my issue was fixed
– node_man
Jan 1 at 5:15
temporarily you can run your application with a flag --max-old-space-size=4000 where 4000 is the RAM in mb. try this and let me know if it helps you.
– node_man
Jan 1 at 5:18
@pravinnavle the error I am getting is during build time when i run "ng build" not while running the application it is happening at uglifyjs stage.
– kumar
Jan 1 at 5:25
add a comment |
I used to get this error in my node js service. I fixed it by modifying the loops that I had used in my code. The error stated it is from a memcached loop. So i simply modified that loop and my issue was fixed
– node_man
Jan 1 at 5:15
temporarily you can run your application with a flag --max-old-space-size=4000 where 4000 is the RAM in mb. try this and let me know if it helps you.
– node_man
Jan 1 at 5:18
@pravinnavle the error I am getting is during build time when i run "ng build" not while running the application it is happening at uglifyjs stage.
– kumar
Jan 1 at 5:25
I used to get this error in my node js service. I fixed it by modifying the loops that I had used in my code. The error stated it is from a memcached loop. So i simply modified that loop and my issue was fixed
– node_man
Jan 1 at 5:15
I used to get this error in my node js service. I fixed it by modifying the loops that I had used in my code. The error stated it is from a memcached loop. So i simply modified that loop and my issue was fixed
– node_man
Jan 1 at 5:15
temporarily you can run your application with a flag --max-old-space-size=4000 where 4000 is the RAM in mb. try this and let me know if it helps you.
– node_man
Jan 1 at 5:18
temporarily you can run your application with a flag --max-old-space-size=4000 where 4000 is the RAM in mb. try this and let me know if it helps you.
– node_man
Jan 1 at 5:18
@pravinnavle the error I am getting is during build time when i run "ng build" not while running the application it is happening at uglifyjs stage.
– kumar
Jan 1 at 5:25
@pravinnavle the error I am getting is during build time when i run "ng build" not while running the application it is happening at uglifyjs stage.
– kumar
Jan 1 at 5:25
add a comment |
1 Answer
1
active
oldest
votes
Can you please try below command from your project directory.
node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build
Thanks for the solution it worked, but is this the right solution or there a possibility something wrong with the project. my main.js is 8MB. main.4961f56ecf3383458478.js (main) 8.1 MB
– kumar
Jan 2 at 13:37
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53993097%2fuglifyjsplugin-out-of-memeory-error-while-building%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Can you please try below command from your project directory.
node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build
Thanks for the solution it worked, but is this the right solution or there a possibility something wrong with the project. my main.js is 8MB. main.4961f56ecf3383458478.js (main) 8.1 MB
– kumar
Jan 2 at 13:37
add a comment |
Can you please try below command from your project directory.
node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build
Thanks for the solution it worked, but is this the right solution or there a possibility something wrong with the project. my main.js is 8MB. main.4961f56ecf3383458478.js (main) 8.1 MB
– kumar
Jan 2 at 13:37
add a comment |
Can you please try below command from your project directory.
node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build
Can you please try below command from your project directory.
node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build
answered Jan 2 at 11:54
![](https://i.stack.imgur.com/4FZmU.jpg?s=32&g=1)
![](https://i.stack.imgur.com/4FZmU.jpg?s=32&g=1)
Mohit SaxenaMohit Saxena
921415
921415
Thanks for the solution it worked, but is this the right solution or there a possibility something wrong with the project. my main.js is 8MB. main.4961f56ecf3383458478.js (main) 8.1 MB
– kumar
Jan 2 at 13:37
add a comment |
Thanks for the solution it worked, but is this the right solution or there a possibility something wrong with the project. my main.js is 8MB. main.4961f56ecf3383458478.js (main) 8.1 MB
– kumar
Jan 2 at 13:37
Thanks for the solution it worked, but is this the right solution or there a possibility something wrong with the project. my main.js is 8MB. main.4961f56ecf3383458478.js (main) 8.1 MB
– kumar
Jan 2 at 13:37
Thanks for the solution it worked, but is this the right solution or there a possibility something wrong with the project. my main.js is 8MB. main.4961f56ecf3383458478.js (main) 8.1 MB
– kumar
Jan 2 at 13:37
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53993097%2fuglifyjsplugin-out-of-memeory-error-while-building%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
624a3qLZ,W,sQKqNl,7zNu3h8 wc1f97M 8LsBjHvAcRn9n9sOupOjbAPnNDyBkvwK,5,yxxKfss
I used to get this error in my node js service. I fixed it by modifying the loops that I had used in my code. The error stated it is from a memcached loop. So i simply modified that loop and my issue was fixed
– node_man
Jan 1 at 5:15
temporarily you can run your application with a flag --max-old-space-size=4000 where 4000 is the RAM in mb. try this and let me know if it helps you.
– node_man
Jan 1 at 5:18
@pravinnavle the error I am getting is during build time when i run "ng build" not while running the application it is happening at uglifyjs stage.
– kumar
Jan 1 at 5:25