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.

Too much memory used for typescript compilation

See original GitHub issue

Confirm by changing [ ] to [x] below to ensure that it’s a bug:

Describe the bug Too much memory used for typescript compilation. Duplicate of https://github.com/aws/aws-sdk-js/issues/2846.

Bringing this up again since I think it is a serious enough problem that we can’t compile even the hello world of the SDK in a EC2 linux t3.micro machine. Running it with --max-old-space-size=4096 and 1 GB swap works, but I don’t think it should take so much memory to compile just this small program.

Is the issue in the browser/Node.js? Node.js

If on Node.js, are you running this on AWS Lambda? No

Details of the browser/Node.js version v12.13.0

SDK version number Example: 2.597.0

To Reproduce (observed behavior) Just trying to compile this one line TS file results in a out of memory error on a t3.micro AWS instance with nothing else running on it!

import  CloudFront from "aws-sdk/clients/cloudfront";

Expected behavior I wanted the program to compile

Screenshots

Additional context

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
rsanathcommented, Oct 11, 2020

@trivikr thanks! I had a unused devdependency of aws-sdk which was making tsc eat all my ram!

1reaction
trivikrcommented, Aug 26, 2020

Verified that this issue is fixed in aws-sdk@2.740.0 by updating dependency in repro repo https://github.com/JakeGinnivan/aws-sdk-deep-imports

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimizing TypeScript Memory Usage - Swatinem
Here we see that each of the nodes is 160 bytes, and both according to the memory profiler, and the tsc --diagnostics output,...
Read more >
How to Reduce RAM Consumption by X6 When Using ts-node
Compile the code with tsc and monitor file changes with nodemon. Instead of using ts-node-dev , which consumes a lot of memory, it...
Read more >
node.js - Different memory usage between compiled typescript ...
When I compile my typescript code, which is exactly the same as the vanilla javascript code, I get an increase in memory usage...
Read more >
ts-node RAM consumption - Medium
Compile the code with tsc and monitor file changes with nodemon. Instead of using ts-node-dev which consumes a lot of memory, it is...
Read more >
Workarounds for Out of Memory Crashes | manual
Does compilation now succeed? This disables additional checking that was added in Typescript 2.4. With noStrictGenericChecks: true, compile time and memory ...
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