Getting error on nodejs(Typescript app) build in ec2 t3a.micro (1GB ram) machine?

<--- Last few GCs --->

[2612:0x380af50]    23284 ms: Mark-sweep 480.6 (485.4) -> 479.6 (485.4) MB, 536.9 / 0.0 ms  (average mu = 0.113, current mu = 0.020) allocation failure scavenge might not succeed
[2612:0x380af50]    23841 ms: Mark-sweep 480.7 (485.4) -> 479.8 (485.4) MB, 511.6 / 0.0 ms  (average mu = 0.097, current mu = 0.081) allocation failure scavenge might not succeed


<--- JS stacktrace --->

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

    0: ExitFrame [pc: 0x1376259]
    1: StubFrame [pc: 0x12f2920]
Security context: 0x0672751808a1 <JSObject>
    2: checkTypeRelatedTo(aka checkTypeRelatedTo) [0x24fca68097d9] [/home/ubuntu/code/api.crawlink.com.v2/node_modules/typescript/lib/tsc.js:~29700] [pc=0x1f5b73016ec1](this=0x218bf6f404a9 <undefined>,0x27471251d8b1 <Type map = 0x28b3d7091e11>,0x24fca6801169 <Type map = 0x3e9d024caf21>,0x24fca6801cd9 <Map map = 0x3e9d024c0ed1>,0x2...

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

Writing Node.js report to file: report.20200112.133936.2612.0.001.json
Node.js report completed
 1: 0x9dab70 node::Abort() [node]
 2: 0x9dbd26 node::OnFatalError(char const*, char const*) [node]
 3: 0xb3b18e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xb3b509 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xce68a5  [node]
 6: 0xce6f36 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
 7: 0xcf2dca v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
 8: 0xcf3cd5 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xcf66e8 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
10: 0xcbd017 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType) [node]
11: 0xff307b v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x1376259  [node]
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] build-ts: `tsc`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the [email protected] build-ts script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2020-01-12T13_39_36_742Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] build: `npm run build-ts && npm run tslint && npm run copy-static-assets && npm run copy-service-accounts`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2020-01-12T13_39_36_755Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] start: `npm run build && npm run serve`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2020-01-12T13_39_36_773Z-debug.log

Might be the application is very large, it required more physical memory (RAM). Change/Upgrade the instance type and try again.

Log in to reply