x)
Yes, this is a regression. Downgrading @angular-devkit/build-angular to 0.801.2 fixes the issue and ES5 bundles can be created successfully.
A clear and concise description of the problem...
ES5 bundles fail to be generated with the error "Maximum call stack size exceeded". In my case, I am building an application with Ionic, which leverages ES5. This appears to have been introduced with this commit.
I have created a repository that demonstrates this bug.
npm installng buildIf you downgrade @angular-devkit/build-angular then build will complete successfully.
npm install @angular-devkit/[email protected]ng buildIssues that don't have enough info and can't be reproduced will be closed.
Generating ES5 bundles for differential loading...
An unhandled exception occurred: Call retries were exceeded
See "/private/var/folders/g8/67bzwl0j545gpglt_9z4k8dw0000gn/T/ng-vOpJ85/angular-errors.log" for further details.
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.3.21
Node: 10.17.0
OS: darwin x64
Angular: 8.2.14
... common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.21
@angular-devkit/build-angular 0.803.21
@angular-devkit/build-optimizer 0.803.21
@angular-devkit/build-webpack 0.803.21
@angular-devkit/core 8.3.21
@angular-devkit/schematics 8.3.21
@angular/cli 8.3.21
@ngtools/webpack 8.3.21
@schematics/angular 8.1.3
@schematics/update 0.803.21
rxjs 6.5.4
typescript 3.5.3
webpack 4.39.2
Duplicate of https://github.com/angular/angular-cli/issues/16515
@devinshoemaker, thanks a lot for the repo. Will post it in other issue.
To confirm behavior, I can reproduce ng build failing.
But the following were successful:
ng build --source-map=false
ng build --prod
ng build --prod --source-map
@devinshoemaker Can you confirm the above on your machine?
@clydin, I got the same results.
@clydin I got the same results as well.
@devinshoemaker If you have some time can you try one more thing? Add the following source map options to the build target options object (note the vendor: true part) and try an ng build:
"sourceMap": {
"scripts": true,
"styles": true,
"vendor": true
}
@clydin adding that to my angular.json resulted in a successful build.
Another possible fix: https://github.com/angular/angular-cli/issues/15493#issuecomment-578400860
@devinshoemaker If you have some time can you try one more thing? Add the following source map options to the build target
optionsobject (note thevendor: truepart) and try anng build:"sourceMap": { "scripts": true, "styles": true, "vendor": true }
This worked for me too, But I have no idea why.
Your other solution works as well: https://github.com/angular/angular-cli/issues/16515#issuecomment-572625203
Also runing ng build --prod works for me.
2nd and maybe 3rd suggest this is a memory problem which for me makes some sense, but every single error I've had mentions node_modules\jest-worker\build\workers\processChild.js, also everyone who pasted a log when creating an issue like this mentions jest-worker. Yet my project has no test written yet at all. Is no one suspicious of this? Could this be some jest bug?
@aledujke have you updated your Angular version? This was fixed for me in a more recent update.
I had to downgrade from ^0.803.25 (after running an ng update @angular/cli@^8) to 0.801.2 to get round the issue when trying to run a non-prod ng build --stats-json:
An unhandled exception occurred: Call retries were exceeded
---
[error] Error: Call retries were exceeded
at ChildProcessWorker.initialize (/sanitized/node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)
at ChildProcessWorker.onExit (/sanitized/node_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)
at ChildProcess.emit (events.js:321:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
I got around the issue with the latest "@angular-devkit/build-angular": "^0.803.25", by running node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng build --stats-json as suggested by clydin here: https://github.com/angular/angular-cli/issues/16515#issuecomment-572625203
The --max_old_space_size flag is discussed here: https://github.com/nodejs/node/issues/7937
@devinshoemaker yes it is fixed for me too now.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._