#FATAL ERROR when running `npx tsc`

18 messages · Page 1 of 1 (latest)

pine sequoia
#

Hi, I'm fresh to TS and I'm trying to convert an existing small JS project of mine to TS and when I run the command above I get this:

<--- Last few GCs --->

[19760:000001CFECA463C0]    51909 ms: Scavenge 4035.3 (4106.5) -> 4029.0 (4123.2) MB, 6.5 / 0.0 ms  (average mu = 0.190, current mu = 0.206) allocation failure 
[19760:000001CFECA463C0]    51939 ms: Scavenge 4045.2 (4124.5) -> 4032.0 (4126.0) MB, 5.2 / 0.0 ms  (average mu = 0.190, current mu = 0.206) allocation failure 
[19760:000001CFECA463C0]    51970 ms: Scavenge 4046.9 (4126.2) -> 4034.6 (4128.5) MB, 5.7 / 0.0 ms  (average mu = 0.190, current mu = 0.206) allocation failure 


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF6E1DB013F v8::internal::CodeObjectRegistry::~CodeObjectRegistry+112495
 2: 00007FF6E1D3F396 DSA_meth_get_flags+65526
 3: 00007FF6E1D4024D node::OnFatalError+301
 4: 00007FF6E26719EE v8::Isolate::ReportExternalAllocationLimitReached+94        
 5: 00007FF6E265BECD v8::SharedArrayBuffer::Externalize+781
 6: 00007FF6E24FF61C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468   
 7: 00007FF6E250C2C9 v8::internal::Heap::PublishPendingAllocations+1129
 8: 00007FF6E250929A v8::internal::Heap::PageFlagsAreConsistent+2842
 9: 00007FF6E24FBF19 v8::internal::Heap::CollectGarbage+2137
10: 00007FF6E24FA0D0 v8::internal::Heap::AllocateExternalBackingStore+2000
11: 00007FF6E251EA06 v8::internal::Factory::NewFillerObject+214
12: 00007FF6E2251CD5 v8::internal::DateCache::Weekday+1797
13: 00007FF6E26FF3E1 v8::internal::SetupIsolateDelegate::SetupHeap+494417
14: 00007FF6E277DEDF v8::internal::SetupIsolateDelegate::SetupHeap+1013327
15: 000001CFEE72D2A1

The VS Code process just reaches the 4GB limit and then I get the error.

Can anyone help me on this?

#

This is my tsconfig.json if it helps:

{
  "compilerOptions": {
    "target": "esnext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
    "module": "commonjs" /* Specify what module code is generated. */,
    "sourceMap": true /* Create source map files for emitted JavaScript files. */,
    "outDir": "./dist" /* Specify an output folder for all emitted files. */,
    "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
    "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
    "strict": true /* Enable all strict type-checking options. */,
    "skipLibCheck": true /* Skip type checking all .d.ts files. */
  }
}
#

no one?

covert fossil
#

@pine sequoia Not a ton to go on. Has it always done that, or did it work and then stop working?

pine sequoia
#

I just managed to fix, was a really weird edge case, not gonna lie

#

I had a folder in the project that had some .ts video files

#

big ones

#

(blame apple)

#

and I guess tsc was trying to parse them

#

I excluded the directory and everything is good

#

now I just need to fix the 20 TSErrors I got lmao

covert fossil
#

Ah, yeah, that is a weird one, haven't heard of that issue before.

#

Didn't even know .ts was a video extension

pine sequoia
#

Didn't know until a few days ago

#

it's a proprietary container from apple afaik

#

idk how to mark this as resolved tho

umbral surge
#

!resolved

young lakeBOT
#

@pine sequoia
Because your issue seemed to be resolved, this post was marked as resolved by @umbral surge.
If your issue is not resolved, you can reopen this post by running !reopen.
If you have a different question, make a new post in #1057653400046674112.