We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Gantt Chart - JavaScript heap out of memory - Production build issue (ng build --prod)

Hi,

We are about to make a purchase of Syncfusion license and already have the invoicing details, but we are facing an issue which is stopping us from doing so.

We have integrated syncfusion/ej2-angular-gantt library in our angular project which is based on Asp.Net Zero
We are able to render a Gantt chart with sample data. However, while trying to run the production build using ng build --prod command, we are getting JavaScript heap out of memory exception.

More details related to our project are as below:

Angular version: 8.1.1
ej2-angular-gantt version: 17.3.27

build configuration:

"production": {
     "optimization": true,
     "outputHashing": "all",
     "sourceMap": false,
     "extractCss": true,
     "namedChunks": false,
     "aot": true,
     "extractLicenses": true,
     "vendorChunk": false,
     "buildOptimizer": true
}

"builder": "@angular-devkit/build-angular:browser"


Error stack trace:

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF7329AC6AA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506
 2: 00007FF732987416 node::MakeCallback+4534
 3: 00007FF732987D90 node_module_register+2032
 4: 00007FF732CA189E v8::internal::FatalProcessOutOfMemory+846
 5: 00007FF732CA17CF v8::internal::FatalProcessOutOfMemory+639
 6: 00007FF732E87F94 v8::internal::Heap::MaxHeapGrowingFactor+9620
 7: 00007FF732E7EF76 v8::internal::ScavengeJob::operator=+24550
 8: 00007FF732E7D5CC v8::internal::ScavengeJob::operator=+17980
 9: 00007FF732E86317 v8::internal::Heap::MaxHeapGrowingFactor+2327
10: 00007FF732E86396 v8::internal::Heap::MaxHeapGrowingFactor+2454
11: 00007FF732FB0468 v8::internal::Factory::AllocateRawArray+56
12: 00007FF732FB657A v8::internal::Factory::NewTransitionArray+58
13: 00007FF732EB23F4 std::vector<v8::internal::compiler::MoveOperands * __ptr64,v8::internal::ZoneAllocator<v8::internal::compiler::MoveOperands * __ptr64> >::_Umove+71364
14: 00007FF732D10EFE v8::internal::JSReceiver::GetOwnPropertyDescriptor+17550
15: 00007FF732D11069 v8::internal::JSReceiver::GetOwnPropertyDescriptor+17913
16: 00007FF732D12E9B v8::internal::JSReceiver::GetOwnPropertyDescriptor+25643
17: 00007FF732D02094 v8::internal::JSReceiver::class_name+4132
18: 00007FF732D125D9 v8::internal::JSReceiver::GetOwnPropertyDescriptor+23401
19: 00007FF73307556E v8::internal::LookupIterator::PrepareTransitionToDataProperty+478
20: 00007FF732D06111 v8::internal::JSReceiver::class_name+20641
21: 00007FF732FA16E9 v8::internal::wasm::WasmCodeManager::LookupCode+15273
22: 00007FF732FA47A4 v8::internal::wasm::WasmCodeManager::LookupCode+27748
23: 000000AF9E95C5C1

It would be great if you can please help us with a solution to resolve the production build issue.

Thanks,
Sanjay

3 Replies

PE Punniyamoorthi Elangovan Syncfusion Team November 15, 2019 11:34 AM UTC

Hi Sanjay, 
 
Greetings from Syncfusion support. 
 
We have checked the reported issue by preparing the simple Gantt sample in Angular. But our application working fine on production build command. 
Please find the environment and machine details below. 
Angular CLI – 8.1.1 
Node JS – 12.13.0 
npm – 6.12.0 
Machine – Windows 10, 8 GB RAM 
 
Please find the sample which is used to check this issue from our side. 
 
We have checked this error in GitHub pages, please refer the command in below link and but this issue still in open state. 
Please check this by upgrade your node JS version to latest, if you still facing this issue, please share your sample or modify the provided sample by us to check this from our side. 
 
Thanks, 
Punniyamoorthi 
 
 



SR SR November 17, 2019 03:46 PM UTC

Hi Punniyamoorthi,

As I previously mentioned, I am using Asp.Net Zero Angular boiler plate. I have attached a sample in which I have just added your @syncfusion/ej2-angular-gantt library without any code changes. The issue is reproducible. Please note that I have not even imported the GanttModule in my code. Also note that I have upgraded my node JS version, still the issue persist.

Steps to run the sample code:
1. Extract the .zip
2. Navigate to the root directory where package.json is and do yarn install
3. Run ng build --prod

It will produce the exact error.

Environment details:
Angular CLI - 8.3.2
Node JS - 12.13.0
NPM - 6.12.0
Machine - Windows 10, 16 GB RAM

Please let me know if you need any more information.

Thanks,
Sanjay

Attachment: angular_4622fa62.zip


PP Pooja Priya Krishna Moorthy Syncfusion Team November 18, 2019 12:33 PM UTC

Hi Sanjay, 
 
Thanks for sharing the details and sample. 
We checked the shared sample, in the mentioned environment configurations with different machines. We could not reproduce the reported issue and production build command was executed properly. 
Please find the attached screenshot. 
 
 
 
And if we don’t include the GanttModule in any of the component, then it is not included in production build,  
Can you please check at your end by specifying the budget value in angular.json file? 
And please run the below command to increase the memory to process and revert us if you still face an error. 
 
node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build --prod 
 
Thanks, 
Pooja Priya K. 


Loader.
Live Chat Icon For mobile
Up arrow icon