-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Out of memory #30473
Comments
Same root cause as #29949. Turning off |
I encountered this in a project part of somewhat big monorepo. It's also a React library project, but I don't know if it's the same cause as the HOCs issue because this particular project doesn't export React component. It does import many types and utility types from 3rd party libraries. I was trying Anyway, even after setting
The |
I ran into a similar memory issue which was causing I'm posting this here in case this helps someone else who also didn't want to disable |
Another memory issue example: https://circleci.com/gh/unional/komondor/988 This happens on Node 8-10, but pass in 11. |
Ran into same problem as @panjiesw. Also importing utility types and the like from many projects. It would just continuously climb no matter what. Turning off incremental compilation fixed it. EDIT: Using create-react-app, so changing
was needed after the command line tsc no longer ran out of memory. I did some debugging on the compiler and it seemed get stuck in an infinite loop on the |
I found the source in my case btw. It's because of the changes in how generics work in 3.4 and later 3.5, and also the type definitions of imported libraries. Few changes to make generics explicit help my projects build |
met same problem and I investigate using llnode It's triggered by using https://github.com/immerjs/immer, after I delete the code using ok, it's fine |
@hardfist your example appears to be running OOM in a different phase of complication than the rest of this thread (so almost definitely has a different root cause) - you should open a new issue. |
I think would be great if TypeScript can figure out the possible locations in the code that cause this out of memory problem. It's really hard to pinpoint... |
We're experiencing similar issue #33612 (comment) |
With 3.7 the memory usage is insane (during |
Getting this as well merely by having Starting with this commit ( |
I've got a self-contained concrete repo for this with no libraries required:
I think that this is due to the changes I made here, which added the following: type SimpleTraverseOptions = {
[type in AST_NODE_TYPES]?: (
node: Extract<TSESTree.Node, { type: type }>,
parent: TSESTree.Node | undefined,
) => void;
};
The intention behind the type was to do something similar to this type without enumerating it all by hand. Example usage of the type is: const x: SimpleTraverseOptions = {
MemberExpression(node): void { ... }
// ^^^^ automatically typed as TSESTree.MemberExpression
}; Versions tested:
|
Experiencing the same issue. Any updates / solutions / recommendations? |
The original example no longer OOMs on latest TS. If you have a new, self-contained example on latest TS, please open a new issue to let us know. ❤️ |
Search Terms:
high memory usage heap react
Code
Expected behavior:
Compiled.
Actual behavior:
Repo: https://github.com/remotelock/react-week-scheduler
Steps to reproduce:
git checkout 9c64f4f7224d199d9706c4fdec4cd073292c1842
yarn
yarn check-ts
Replacing
React.ElementType
here (L25 & 27) withany
works around the bug.The text was updated successfully, but these errors were encountered: