question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update from typescript 3.1 to 3.6 -> out of memory exception (exit code 134)

See original GitHub issue

TypeScript Version: 3.6

Search Terms: 3.6 exit code 134 out of memory

Code We have loads of code in our codebase, I have no idea what causes the issue

Expected behavior: compilation succeeds

Actual behavior: error during compilation, error code 134

Playground Link: don’t have one

Related Issues: nope


Now that I’ve tried to fill out the mandatory form. Let me explain my issue. Earlier today I’ve updated visual studio to version 16.3.1. This also installed typescript 3.6. Now after this, our project doesn’t compile correctly anymore. We have defined our project to use the latest typescript version. The compile command and error are:

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\NodeJs\node.exe" "C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.6\tsc.js"  --project "my project\jsconfig.json" --listEmittedFiles --locale en-US --listFiles --noEmit

<--- Last few GCs --->
il[22168:00289418]    12789 ms: Mark-sweep 700.8 (723.5) -> 700.5 (724.0) MB, 653.4 / 0.0 ms  (+ 0.0 ms in 15 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 661 ms) (average mu = 0.069, current mu = 0.011) allocation fail[22168:00289418]    13381 ms: Mark-sweep 701.2 (724.0) -> 701.1 (724.5) MB, 580.3 / 0.0 ms  (+ 5.6 ms in 11 steps since start of marking, biggest step 3.7 ms, walltime since start of marking 591 ms) (average mu = 0.039, current mu = 0.011) allocation fail

<--- JS stacktrace --->

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

    0: ExitFrame [pc: 0EFD209E]
Security context: 0x38912701 <JSObject>
    1: parseLiteralLikeNode(aka parseLiteralLikeNode) [25964FB1] [C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.6\tsc.js:~18999] [pc=3394A9CD](this=0x1270438d <undefined>,kind=17)
    2: parseTemplateMiddleOrTemplateTail(aka parseTemplateMiddleOrTemplateTail) [25967F5D] [C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.6\tsc.js:18995] [bytecode=2413F4D5 offset=...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00A2254E node::MakeCallback+3774
 2: 0107C652 v8::internal::Heap::MaxHeapGrowingFactor+9554
 3: 010733F1 v8::internal::ScavengeJob::operator=+16593
 4: 0107AAEE v8::internal::Heap::MaxHeapGrowingFactor+2542

before the update, we used typescript 3.1, which worked fine. A difference I spotted is that in 3.1, tsc.exe was called directly, while in 3.6 it is called via nodejs. It also takes WAY longer and eats lots of memory (probably causing the memory exception).

We’ve now worked around it by fixing the typescript version to 3.1 in our project

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
Hotellcommented, Nov 19, 2019

@RyanCavanaugh we are experiencing similar “Out of memory” exception (what’s very weird, it’s not consistent - can be reproduced only some machines)

our codebase metadata:

yarn tsc  --extendedDiagnostics

Files:                        3470
Lines:                      503907
Nodes:                     2175468
Identifiers:                731976
Symbols:                    964407
Types:                      390897
Memory used:              1157734K
Assignability cache size:   241363
Identity cache size:          7302
Subtype cache size:          27856
I/O Read time:               1.00s
Parse time:                  2.43s
Program time:                6.08s
Bind time:                   1.50s
Check time:                 24.41s
Total time:                 31.98s

⚡️Looks like the issue persist within how includes are defined

Following triggers out of memory error:

"include": ["typings", "src/js", "apps", "libs"],

With this one, all good:

"include": [
    "typings/**/*.d.ts",
    "src/js/**/*.ts",
    "src/js/**/*.tsx",
    "src/js/**/*.js",
    "apps/**/*.ts",
    "apps/**/*.tsx",
    "libs"
]

ts version: 3.6.4

UPDATE:

The issue is caused by javascript files within apps/**/*.js

following causes memory error:

"include": [
    "typings/**/*.d.ts",
    "src/js/**/*.ts",
    "src/js/**/*.tsx",
    "src/js/**/*.js",
    "apps/**/*.ts",
    "apps/**/*.tsx",
+    "apps/**/*.js",
    "libs"
]

any ideas ?

0reactions
carlosen14commented, Aug 18, 2020

@RyanCavanaugh we are experiencing similar “Out of memory” exception (what’s very weird, it’s not consistent - can be reproduced only some machines)

our codebase metadata:

yarn tsc  --extendedDiagnostics

Files:                        3470
Lines:                      503907
Nodes:                     2175468
Identifiers:                731976
Symbols:                    964407
Types:                      390897
Memory used:              1157734K
Assignability cache size:   241363
Identity cache size:          7302
Subtype cache size:          27856
I/O Read time:               1.00s
Parse time:                  2.43s
Program time:                6.08s
Bind time:                   1.50s
Check time:                 24.41s
Total time:                 31.98s

zapLooks like the issue persist within how includes are defined

Following triggers out of memory error:

"include": ["typings", "src/js", "apps", "libs"],

With this one, all good:

"include": [
    "typings/**/*.d.ts",
    "src/js/**/*.ts",
    "src/js/**/*.tsx",
    "src/js/**/*.js",
    "apps/**/*.ts",
    "apps/**/*.tsx",
    "libs"
]

ts version: 3.6.4

UPDATE:

The issue is caused by javascript files within apps/**/*.js

following causes memory error:

"include": [
    "typings/**/*.d.ts",
    "src/js/**/*.ts",
    "src/js/**/*.tsx",
    "src/js/**/*.js",
    "apps/**/*.ts",
    "apps/**/*.tsx",
+    "apps/**/*.js",
    "libs"
]

any ideas ?

I had a task.js file in a bin folder, exclude it solved the problem!

  "exclude": [
      "bin"
  ]
Read more comments on GitHub >

github_iconTop Results From Across the Web

node.exe exited with code 134 Visual Studio - Stack Overflow
I got this error code with a TypeScript project. In my tsconfig, I had the allowJS option turned on. The verbose output told...
Read more >
What's New | Oracle, Software. Hardware. Complete.
Packages Released on Oracle Linux Yum Server · objenesis-1.2-19.el7 - A library for instantiating Java objects (Update) · lxi-tools-2.4-2.el7 - Tools to manage ......
Read more >
Javascript heap out of memory when doing build-storybook ...
Describe the bug When trying to do build-storybook it gets to 92% and then fails with the following out of memory error:
Read more >
failed to install expo package with error: yarnpkg exited with ...
Try deleting yarn.lock file & .expo folder and try running expo upgrade again. It worked for me upgrading expo from 44 -> 45....
Read more >
Changelog - Cypress Documentation
Updated the error messaging to provide more context when parallel group parameters ... open mode which lead to out of memory crashes on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found