-
Notifications
You must be signed in to change notification settings - Fork 12k
Call retries were exceeded. Allocation failed - JavaScript heap out of memory error on build #16515
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
Comments
Can you provide the console output of the successful build? The amount and sizes of the output files are of particular interest. Also of concern is that the following are not at .21 as the other dependencies are:
Are these manually specified in the workspace's package.json? |
Thanks for the response. Sorry to repeat, but this is failing on both debug and production environments. However, on a successful build: ng build --prod
ng build
angular.json
Memory
Hope this helps |
I have exact same issue, need help |
From #16520
|
An update to this; changing the |
FYI, changing to ES5 allowed my build to go through too |
@devinshoemaker same here! changing to ES5 allowed my build to go through too. |
Changing the target to es5 disables differential loading, which may not be desired in all cases. |
Facing this on a CI pipeline as well. And have no desire to turn off differential builds. |
@AhsanAyaz you might try this workaround that was posted in a different issue: #16520 (comment) |
The above was my use-case. If you also want to disable the differential loading only for a certain configuration, you can create a new For my case, I created a {
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": [],
"target": "ES5",
},
"exclude": [
"test.ts",
"**/*.spec.ts"
]
} And then I'm just running the below script to not ruin my other builds which use optimizations and are successful at the moment: ng build --configuration=devserver --ts-config ./src/tsconfig.devserver.json
|
It is working again for me with the latest versions (released a few hours ago):
|
The recently released version of the CLI (8.3.22) has several improvements to prevent excessive memory usage when processing source maps. Based on the provided reproductions, the memory usage issues were no longer present when using the new version. If anyone is still encountering issues after ensuring these changes, please open a new issue describing the problem and if possible provide a minimal reproduction. |
run for me too |
changing to ES5 not working here |
I have encountered the same issue now when trying to build for test env using anuglar 9 with ivy disabled |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was:@angular/cli 8.3.20
@angular-devkit/build-angular 0.803.20
Description
A clear and concise description of the problem...After updating to 8.3.21, when I run 'ng build' or 'ng build --prod' the build reaches the 'Generating ES5 bundles for differential loading' stage. It then stops outputting information, and multiple report.xxx.json files (attached) are created, approximately 45 seconds apart.
Reverting back to 8.3.20 resolves this issue.
🔬 Minimal Reproduction
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
Contents of a report file:
The text was updated successfully, but these errors were encountered: