New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: JavaScript heap out of memory in CI with tsc with @babel/types 7.18.9 #14767
Comments
Hey @jlowcs! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite. |
It seems to me the GC error occurs when you are running |
I don't see why tsc would call eslint-parser tbh. I'm thinking tsc is just loading the babel types for some reason, and that's what causes the GC error. It's gonna be tricky and time consuming to provide a reproduction repo since I'm only seeing the issue in the CI. I don't know when I'll have any available time to put into that. I could maybe try running tsc in debug mode to try and see why it's attempting to load the babel types. |
An easy way, you can add a |
I noticed that
So I tried deleting I was able to pinpoint the version of Not sure where to go from there. |
It's interesting. Your feedback is also very helpful! I found in your bug report that there is an OOM when the memory reaches 2GB. Actually I'm not sure this is a technical bug, 2GB of RAM is a bit small.😕 |
Can you reproduce this issue on 7.18.8 with a smaller memory limit, i.e. |
I'm closing it now due to long periods of inactivity, feel free to reopen it if the problem persists. |
FYI I have been consistently running into this on a Github Actions hosted runner using ubuntu-latest, and the project includes jest@29.1.2 that transitively pulls in @babel/types@7.19.4 I don't have a minimal shareable reproduction at the moment, but I did run a performance profile of tsc locally (where it still works fine) following these instructions - https://github.com/microsoft/TypeScript/wiki/Performance#performance-tracing I found in the thread for the tsc side of this issue - microsoft/TypeScript#44299 The output coming from @babel/types is enormous and so it won't fit into a comment (also I don't quite know what to make of it yet), but here's a very small snippet of it
|
@sadikassistivlabs What version of nodejs and typescript are you using? Have you tried https://www.typescriptlang.org/docs/handbook/nightly-builds.html? |
Node 14.20.0 and Typescript 4.6.3 And not yet, but the next thing for me to try is upgrading to the latest stable TS, as someone in that other thread said it fixed things for them |
💻
How are you using Babel?
@babel/eslint-parser
Input code
Configuration file name
No response
Configuration
Our project uses typescript with
"allowJs": true
. Other projects with"allowJs": false
don't seem to have the issue.babel.config.js:
Current and expected behavior
The following exception appears in circleci:
I couldn't reproduce on my own computer.
Environment
Possible solution
No response
Additional context
I initially bumped
@babel/preset-env
, then tried bumping each of its updated dependencies separately in the lockfile to pinpoint the culprit, which ended up being@babel/types
.I only see #14763 as a recent PR on
@babel/types
. Not sure how this could impacttsc
.The text was updated successfully, but these errors were encountered: