"JavaScript heap out of memory" error while building custom theia

Hi all,
When I build theia, i get the following errors:
browser-app: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory\n 1: 0x8dc510 node::Abort() [node]\n 2: 0x8dc55c [node]\n 3: 0xad9b5e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]\n 4: 0xad9d94 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]\n 5: 0xec7bf2 [node]\n 6: 0xec7cf8 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [node]\n 7: 0xed3dd2 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]\n 8: 0xed4704 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]\n 9: 0xed7371 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [node] browser-app: 10: 0xea07f4 v8::internal::factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [node] browser-app: 11: 0x11402db v8::internal::Runtime_AllocateInTargetSpace(int, v8::internal::Object**, v8::internal::Isolate*) [node] browser-app: 12: 0x32ec3a75be1d browser-app: Error: webpack exited with an unexpected signal: SIGABRT.\n at ChildProcess. (/home/theia/node_modules/@theia/application-manager/lib/application-process.js:59:28)\n at ChildProcess.emit (events.js:189:13)\n at maybeClose (internal/child_process.js:970:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

Can anyone guide me on this? Thanks in advance.

[original thread by rs]

have you tried to increase max memory: https://spectrum.chat/theia/dev/how-to-create-and-add-extension-to-theia-ide~a6fbbc04-f5f5-41be-b88a-fff158cbd65b?m=MTU1OTcxNzM2MzEwMg==https://spectrum.chat/theia/dev/how-to-create-and-add-extension-to-theia-ide~a6fbbc04-f5f5-41be-b88a-fff158cbd65b

[rs]

Thank you, @Anton. i shall try.