Atlaskit editor-core out of memory when using CRA

I just added th latest editor-core package and then added a simle to the empty App.js in CRA, so there should be nothing in the app except the editor. When i run ‘npm start’ I see ‘Starting the development server…’ for a few minutes and then this error appears:

<--- Last few GCs --->

[17880:000001B142CB6CF0]   127940 ms: Scavenge 4084.8 (4100.0) -> 4084.1 (4100.0) MB, 14.1 / 0.0 ms  (average mu = 0.132, current mu = 0.001) allocation failure
[17880:000001B142CB6CF0]   127955 ms: Scavenge 4085.3 (4100.5) -> 4084.8 (4100.7) MB, 12.6 / 0.0 ms  (average mu = 0.132, current mu = 0.001) allocation failure
[17880:000001B142CB6CF0]   127970 ms: Scavenge 4085.5 (4100.7) -> 4084.9 (4101.0) MB, 14.4 / 0.0 ms  (average mu = 0.132, current mu = 0.001) allocation failure


<--- JS stacktrace --->

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

    0: ExitFrame [pc: 00007FF7E979463D]
Security context: 0x00efe6e808a1 <JSObject>
    1: SourceMapConsumer_allGeneratedPositionsFor [00000271559A99F1] [C:\node_projects\jira\client\node_modules\source-map\lib\source-map-consumer.js:~178] [pc=000003CBB14499F1](this=0x00e4479401a1 <BasicSourceMapConsumer map = 000001FADC442BE1>,0x02e5c0774661 
<Object map = 000001FADC442461>)
    2: /* anonymous */(aka /* anonymous */) [00000140...

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

Writing Node.js report to file: report.20200118.163212.17880.0.001.json
Node.js report completed
 1: 00007FF7E8BC232F napi_wrap+124543
 2: 00007FF7E8B636A6 public: bool __cdecl v8::base::CPU::has_sse(void)const __ptr64+34502
 3: 00007FF7E8B64366 public: bool __cdecl v8::base::CPU::has_sse(void)const __ptr64+37766
 4: 00007FF7E9368C5E private: void __cdecl v8::Isolate::ReportExternalAllocationLimitReached(void) __ptr64+94
 5: 00007FF7E9350CA1 public: class v8::SharedArrayBuffer::Contents __cdecl v8::SharedArrayBuffer::Externalize(void) __ptr64+833
 6: 00007FF7E921E56C public: static void __cdecl v8::internal::Heap::EphemeronKeyWriteBarrierFromCode(unsigned __int64,unsigned __int64,class v8::internal::Isolate * __ptr64)+1436
 7: 00007FF7E9229910 public: void __cdecl v8::internal::Heap::ProtectUnprotectedMemoryChunks(void) __ptr64+1312
 8: 00007FF7E9226444 public: static bool __cdecl v8::internal::Heap::PageFlagsAreConsistent(class v8::internal::HeapObject)+3204        
 9: 00007FF7E921BCD3 public: bool __cdecl v8::internal::Heap::CollectGarbage(enum v8::internal::AllocationSpace,enum v8::internal::GarbageCollectionReason,enum v8::GCCallbackFlags) __ptr64+1283
10: 00007FF7E921A4A4 public: void __cdecl v8::internal::Heap::AddRetainedMap(class v8::internal::Handle<class v8::internal::Map>) __ptr64+2356
11: 00007FF7E923B775 public: class v8::internal::Handle<class v8::internal::HeapObject> __cdecl v8::internal::Factory::NewFillerObject(int,bool,enum v8::internal::AllocationType) __ptr64+53
12: 00007FF7E8FA7A49 public: class v8::internal::interpreter::JumpTableTargetOffsets::iterator & __ptr64 __cdecl v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=(class v8::internal::interpreter::JumpTableTargetOffsets::iterator && __ptr64) __ptr64+4057
13: 00007FF7E979463D public: virtual bool __cdecl v8::internal::SetupIsolateDelegate::SetupHeap(class v8::internal::Heap * __ptr64) __ptr64+567949
14: 000003CBB14499F1

The same goes to ‘@atlaskit/renderer’

Help
:slight_smile:

3 Likes

I have the same problem.
Were you able to solve the issue?

Facing similar issues editor-core makes CRA take forever to load/compile and has out of date imports for other packages like styled-components and media viewer.