ckeditor / ckeditor5-angular

Official CKEditor 5 Angular 5+ component.
https://ckeditor.com/ckeditor-5
Other
205 stars 112 forks source link

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

Open adamnik101 opened 1 month ago

adamnik101 commented 1 month ago

All I did wasnpm install --save @ckeditor/ckeditor5-angular, imported it in shared.module.ts

import { CKEditorModule } from '@ckeditor/ckeditor5-angular';

And after typing ng serve i get this error message after it finishes sealing...

Also RAM usage spikes up to 4 gigs more than usual...

What could be the cause of this error message? I have tried deleting node_modules folder and package-lock.json file, but nothing...

<--- Last few GCs --->

[9596:0000025CF076BD10]   201554 ms: Scavenge 3902.7 (4134.4) -> 3902.7 (4134.4) MB, 5.6 / 0.0 ms  (average mu = 0.237, current mu = 0.285) external memory pressure;
[9596:0000025CF076BD10]   203444 ms: Mark-sweep 3909.8 (4141.1) -> 3879.1 (4132.1) MB, 1865.0 / 0.0 ms  (average mu = 0.182, current mu = 0.115) allocation failure; GC in old space requested

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF61745D84F node_api_throw_syntax_error+174175
 2: 00007FF6173E0DA6 v8::internal::wasm::WasmCode::safepoint_table_offset+59926
 3: 00007FF6173E2A40 v8::internal::wasm::WasmCode::safepoint_table_offset+67248
 4: 00007FF617E8D604 v8::Isolate::ReportExternalAllocationLimitReached+116
 5: 00007FF617E78992 v8::Isolate::Exit+674
 6: 00007FF617CFA87C v8::internal::EmbedderStackStateScope::ExplicitScopeForTesting+124
 7: 00007FF617D07B5D v8::internal::Heap::PublishPendingAllocations+1117
 8: 00007FF617D04BE7 v8::internal::Heap::PageFlagsAreConsistent+3367
 9: 00007FF617CF7317 v8::internal::Heap::CollectGarbage+2039
10: 00007FF617D0DCD3 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath+2099
11: 00007FF617D0E57D v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath+93
12: 00007FF617D16EAF v8::internal::Factory::AllocateRaw+783
13: 00007FF617D2A27D v8::internal::FactoryBase<v8::internal::Factory>::NewHeapNumber<0>+685
14: 00007FF617D2E728 v8::internal::FactoryBase<v8::internal::Factory>::NewRawTwoByteString+72
15: 00007FF617AD5B24 v8::internal::String::SlowFlatten+724
16: 00007FF617E9718D v8::String::Utf8Length+141
17: 00007FF61740703E v8::internal::Malloced::operator delete+18078
18: 00007FF617E461ED v8::internal::Builtins::code+248285
19: 00007FF617E45DF9 v8::internal::Builtins::code+247273
20: 00007FF617E460BC v8::internal::Builtins::code+247980
21: 00007FF617E45F20 v8::internal::Builtins::code+247568
22: 00007FF617F2B601 v8::internal::SetupIsolateDelegate::SetupHeap+558513
23: 00007FF5EFCE39E9

This is Angular version

ng version

Angular CLI: 17.3.8
Node: 18.20.4
Package Manager: npm 10.7.0
OS: win32 x64

Angular: 17.3.12
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1703.8
@angular-devkit/build-angular      17.3.8
@angular-devkit/core               17.3.8
@angular-devkit/schematics         17.3.8
@angular/cdk                       17.3.10
@angular/cdk-experimental          16.2.6
@angular/cli                       17.3.8
@angular/material                  17.3.10
@angular/material-moment-adapter   17.3.10
@schematics/angular                17.3.8
ng-packagr                         17.3.0
rxjs                               7.8.1
typescript                         5.4.5
zone.js                            0.14.7
Witoso commented 1 month ago

Haven't seen this for a while, the best workaround would be to increase the memory for node:

export NODE_OPTIONS="--max-old-space-size=4096"

or 

node --max_old_space_size=4096
adamnik101 commented 1 month ago

Haven't seen this for a while, the best workaround would be to increase the memory for node:

export NODE_OPTIONS="--max-old-space-size=4096"

or 

node --max_old_space_size=4096

After deleting node_modules and package-lock.json and installing the package i get the same error after ng serve is done sealing.. Does this package depends on some other package?