[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[x] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Source: https://github.com/angular/angular/issues/25286
$ ng build --prod --aot=false
Your global Angular CLI version (6.0.8) is greater than your local
version (1.5.4). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Date: 2018-08-03T14:20:26.925Z
Hash: 7ef0dc48f58f3c6be114
Time: 81775ms
chunk {0} polyfills.e8c106aae21b5a2364e7.bundle.js (polyfills) 96.2 kB [initial] [rendered]
chunk {1} main.2bfa46edcefe41d2d2ed.bundle.js (main) 1.44 MB [initial] [rendered]
chunk {2} styles.59fd733508abc03f82fb.bundle.css (styles) 370 kB [initial] [rendered]
chunk {3} vendor.abc0af0257250c054d0b.bundle.js (vendor) 4.44 MB [initial] [rendered]
chunk {4} inline.6e1478b27af86e1ddf44.bundle.js (inline) 1.45 kB [entry] [rendered]
$ ng build --prod
Your global Angular CLI version (6.0.8) is greater than your local
version (1.5.4). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
92% chunk asset optimization
Production build with aot It is taking too much time. I have wait for 15 minutes. Still not completed. It was stuck at 92%. Please help me out. Should I deploy build on server with --aot=false parameter.
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ â–³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 1.5.4
Node: 8.9.3
OS: win32 x64
Angular: 5.1.3
... compiler, compiler-cli, core, platform-browser
... platform-browser-dynamic
@angular/animations: 4.4.6
@angular/cdk: 5.2.1
@angular/cli: 1.5.4
@angular/common: 4.4.6
@angular/flex-layout: 2.0.0-beta.10-4905443
@angular/forms: 4.4.6
@angular/http: 4.4.6
@angular/material: 5.2.1
@angular/router: 4.4.6
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.21
@angular-devkit/schematics: 0.0.37
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.4
@schematics/angular: 0.1.7
typescript: 2.4.2
webpack: 3.8.1
Can you setup a minimal repro please?
You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.
It actually is not stuck but just takes a long time ~30 minutes
I noticed it happening on CI in a docker container with node 10.
On the local machine it builds fine - in a couple of minutes.
After more digging - issue is present when using yarn for dependency instalation.
Build is stuck at 92% chunk asset optimization UglifyJSPlugin
After another round of experiments:
increasing node memory limit fixed this issue for me
set NODE_OPTIONS=--max-old-space-size=4096
We started getting the same problem with 6.1.3. All Travis jobs are down even with node 8.
I have wait 1 hours still it was stuck on 92%. +1 Thanks @janisr . It worked for me
node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng build --prod
but get error thank god it not stuck again.
ERROR in ./node_modules/rxjs/observable/BoundCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
at Object.getEffectiveTypeAnnotationNode (XXXX\node_modules\typescript\lib\typescript.js:9341:18)
at assignContextualParameterTypes (XXXX\node_modules\typescript\lib\typescript.js:41652:25)
at checkFunctionExpressionOrObjectLiteralMethod (XXXX\node_modules\typescript\lib\typescript.js:41948:29)
at checkExpressionWorker (XXXX\node
_modules\typescript\lib\typescript.js:42959:28)
at checkExpression (XXXX\node_modul
es\typescript\lib\typescript.js:42898:42)
at checkExpressionCached (XXXX\node
_modules\typescript\lib\typescript.js:42779:38)
at checkReturnStatement (XXXX\node_
modules\typescript\lib\typescript.js:45418:54)
at checkSourceElement (XXXX\node_mo
dules\typescript\lib\typescript.js:46763:28)
at Object.forEach (XXXX\node_module
s\typescript\lib\typescript.js:1506:30)
at checkBlock (XXXX\node_modules\ty
pescript\lib\typescript.js:44563:16)
at checkSourceElement (XXXX\node_mo
dules\typescript\lib\typescript.js:46742:28)
at checkFunctionExpressionOrObjectLiteralMethodDeferred (XXXX\node_modules\typescript\lib\typescript.js:41990:21)
at checkDeferredNodes (XXXX\node_mo
dules\typescript\lib\typescript.js:46828:25)
at checkSourceFileWorker (XXXX\node
_modules\typescript\lib\typescript.js:46863:17)
at checkSourceFile (XXXX\node_modul
es\typescript\lib\typescript.js:46842:13)
at Object.forEach (XXXX\node_module
s\typescript\lib\typescript.js:1506:30)
@ ./node_modules/rxjs/observable/bindCallback.js 2:32-68
@ ./node_modules/rxjs/add/observable/bindCallback.js
@ ./node_modules/rxjs/Rx.js
@ ./src/app/child/child-parent/child-parent-modal.component.ts
@ ./src/app/child/child-parent/child-parent-modal.component.ngfactory.js
@ ./src/app/app.module.ngfactory.js
@ ./src/main.ts
@ multi ./src/main.ts
ERROR in ./node_modules/rxjs/observable/BoundNodeCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
at Object.getEffectiveTypeAnnotationNode (XXXX\node_modules\typescript\lib\typescript.js:9341:18)
at assignContextualParameterTypes (XXXX\node_modules\typescript\lib\typescript.js:41652:25)
at checkFunctionExpressionOrObjectLiteralMethod (XXXX\node_modules\typescript\lib\typescript.js:41948:29)
at checkExpressionWorker (XXXX\node
_modules\typescript\lib\typescript.js:42959:28)
at checkExpression (XXXX\node_modul
es\typescript\lib\typescript.js:42898:42)
at checkExpressionCached (XXXX\node
_modules\typescript\lib\typescript.js:42779:38)
at checkReturnStatement (XXXX\node_
modules\typescript\lib\typescript.js:45418:54)
at checkSourceElement (XXXX\node_mo
dules\typescript\lib\typescript.js:46763:28)
at Object.forEach (XXXX\node_module
s\typescript\lib\typescript.js:1506:30)
at checkBlock (XXXX\node_modules\ty
pescript\lib\typescript.js:44563:16)
at checkSourceElement (XXXX\node_mo
dules\typescript\lib\typescript.js:46742:28)
at checkFunctionExpressionOrObjectLiteralMethodDeferred (XXXX\node_modules\typescript\lib\typescript.js:41990:21)
at checkDeferredNodes (XXXX\node_mo
dules\typescript\lib\typescript.js:46828:25)
at checkSourceFileWorker (XXXX\node
_modules\typescript\lib\typescript.js:46863:17)
at checkSourceFile (XXXX\node_modul
es\typescript\lib\typescript.js:46842:13)
at Object.forEach (XXXX\node_module
s\typescript\lib\typescript.js:1506:30)
@ ./node_modules/rxjs/observable/bindNodeCallback.js 2:36-76
@ ./node_modules/rxjs/add/observable/bindNodeCallback.js
@ ./node_modules/rxjs/Rx.js
@ ./src/app/child/child-parent/child-parent-modal.component.ts
@ ./src/app/child/child-parent/child-parent-modal.component.ngfactory.js
@ ./src/app/app.module.ngfactory.js
@ ./src/main.ts
@ multi ./src/main.ts
ERROR in ./node_modules/rxjs/_esm5/observable/BoundNodeCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
at Object.getEffectiveTypeAnnotationNode (XXXX\node_modules\typescript\lib\typescript.js:9341:18)
at assignContextualParameterTypes (XXXX\node_modules\typescript\lib\typescript.js:41652:25)
at checkFunctionExpressionOrObjectLiteralMethod (XXXX\node_modules\typescript\lib\typescript.js:41948:29)
at checkExpressionWorker (XXXX\node
_modules\typescript\lib\typescript.js:42959:28)
at checkExpression (XXXX\node_modul
es\typescript\lib\typescript.js:42898:42)
at checkExpressionCached (XXXX\node
_modules\typescript\lib\typescript.js:42779:38)
at checkReturnStatement (XXXX\node_
modules\typescript\lib\typescript.js:45418:54)
at checkSourceElement (XXXX\node_mo
dules\typescript\lib\typescript.js:46763:28)
at Object.forEach (XXXX\node_module
s\typescript\lib\typescript.js:1506:30)
at checkBlock (XXXX\node_modules\ty
pescript\lib\typescript.js:44563:16)
at checkSourceElement (XXXX\node_mo
dules\typescript\lib\typescript.js:46742:28)
at checkFunctionExpressionOrObjectLiteralMethodDeferred (XXXX\node_modules\typescript\lib\typescript.js:41990:21)
at checkDeferredNodes (XXXX\node_mo
dules\typescript\lib\typescript.js:46828:25)
at checkSourceFileWorker (XXXX\node
_modules\typescript\lib\typescript.js:46863:17)
at checkSourceFile (XXXX\node_modul
es\typescript\lib\typescript.js:46842:13)
at Object.forEach (XXXX\node_module
s\typescript\lib\typescript.js:1506:30)
@ ./node_modules/rxjs/_esm5/observable/bindNodeCallback.js 2:0-76
@ ./node_modules/rxjs/_esm5/add/observable/bindNodeCallback.js
@ ./node_modules/rxjs/_esm5/Rx.js
@ ./src/app/services/api.service.ts
@ ./src/app/services/index.ts
@ ./src/app/child/agency-contact-details/agency-contact-details-modal.component
.ts
@ ./src/app/child/agency-contact-details/agency-contact-details-modal.component
.ngfactory.js
@ ./src/app/app.module.ngfactory.js
@ ./src/main.ts
@ multi ./src/main.ts
ERROR in ./node_modules/rxjs/_esm5/observable/BoundCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
at Object.getEffectiveTypeAnnotationNode (XXXX\node_modules\typescript\lib\typescript.js:9341:18)
at assignContextualParameterTypes (XXXX\node_modules\typescript\lib\typescript.js:41652:25)
at checkFunctionExpressionOrObjectLiteralMethod (XXXX\node_modules\typescript\lib\typescript.js:41948:29)
at checkExpressionWorker (XXXX\node
_modules\typescript\lib\typescript.js:42959:28)
at checkExpression (XXXX\node_modul
es\typescript\lib\typescript.js:42898:42)
at checkExpressionCached (XXXX\node
_modules\typescript\lib\typescript.js:42779:38)
at checkReturnStatement (XXXX\node_
modules\typescript\lib\typescript.js:45418:54)
at checkSourceElement (XXXX\node_mo
dules\typescript\lib\typescript.js:46763:28)
at Object.forEach (XXXX\node_module
s\typescript\lib\typescript.js:1506:30)
at checkBlock (XXXX\node_modules\ty
pescript\lib\typescript.js:44563:16)
at checkSourceElement (XXXX\node_mo
dules\typescript\lib\typescript.js:46742:28)
at checkFunctionExpressionOrObjectLiteralMethodDeferred (XXXX\node_modules\typescript\lib\typescript.js:41990:21)
at checkDeferredNodes (XXXX\node_mo
dules\typescript\lib\typescript.js:46828:25)
at checkSourceFileWorker (XXXX\node
_modules\typescript\lib\typescript.js:46863:17)
at checkSourceFile (XXXX\node_modul
es\typescript\lib\typescript.js:46842:13)
at Object.forEach (XXXX\node_module
s\typescript\lib\typescript.js:1506:30)
@ ./node_modules/rxjs/_esm5/observable/bindCallback.js 2:0-68
@ ./node_modules/rxjs/_esm5/add/observable/bindCallback.js
@ ./node_modules/rxjs/_esm5/Rx.js
@ ./src/app/services/api.service.ts
@ ./src/app/services/index.ts
@ ./src/app/child/agency-contact-details/agency-contact-details-modal.component
.ts
@ ./src/app/child/agency-contact-details/agency-contact-details-modal.component
.ngfactory.js
@ ./src/app/app.module.ngfactory.js
@ ./src/main.ts
@ multi ./src/main.ts
Build successful: https://github.com/angular/angular-cli/issues/7110#issuecomment-346911166. Just Upgrade TypeScript. It worked for me.
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._
Most helpful comment
We started getting the same problem with 6.1.3. All Travis jobs are down even with node 8.