I am getting below error when I try to compile with aot.
Command: ng build --prod
ERROR in ./node_modules/rxjs/_esm5/observable/BoundCallbackObservable.js
Module build failed: TypeError: Cannot read property 'type' of undefined
at Object.getEffectiveTypeAnnotationNode (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:9341:17)
at assignContextualParameterTypes (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:41652:25)
at checkFunctionExpressionOrObjectLiteralMethod (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:41948:29)
at checkExpressionWorker (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:42959:28)
at checkExpression (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:42898:42)
at checkExpressionCached (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:42779:38)
at checkReturnStatement (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:45418:54)
at checkSourceElement (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:46763:28)
at Object.forEach (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:1506:30)
at checkBlock (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:44563:16)
at checkSourceElement (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:46742:28)
at checkFunctionExpressionOrObjectLiteralMethodDeferred (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:41990:21)
at checkDeferredNodes (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:46828:25)
at checkSourceFileWorker (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:46863:17)
at checkSourceFile (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:46842:13)
at Object.forEach (C:\CP Repo\Git\node_modules\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/ng2-adal/dist/services/adal.service.js
@ ./src/app/app.module.ngfactory.js
@ ./src/main.ts
@ multi ./src/main.ts
I am getting below error when I try to compile with aot.
Command: ng build --prod
ERROR in ./node_modules/rxjs/_esm5/observable/BoundCallbackObservable.js Module build failed: TypeError: Cannot read property 'type' of undefined at Object.getEffectiveTypeAnnotationNode (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:9341:17) at assignContextualParameterTypes (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:41652:25) at checkFunctionExpressionOrObjectLiteralMethod (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:41948:29) at checkExpressionWorker (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:42959:28) at checkExpression (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:42898:42) at checkExpressionCached (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:42779:38) at checkReturnStatement (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:45418:54) at checkSourceElement (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:46763:28) at Object.forEach (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:1506:30) at checkBlock (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:44563:16) at checkSourceElement (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:46742:28) at checkFunctionExpressionOrObjectLiteralMethodDeferred (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:41990:21) at checkDeferredNodes (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:46828:25) at checkSourceFileWorker (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:46863:17) at checkSourceFile (C:\CP Repo\Git\node_modules\typescript\lib\typescript.js:46842:13) at Object.forEach (C:\CP Repo\Git\node_modules\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/ng2-adal/dist/services/adal.service.js @ ./src/app/app.module.ngfactory.js @ ./src/main.ts @ multi ./src/main.ts