sureshchahal / angular2-adal

Angular 2 wrapper for adal.js
MIT License
41 stars 50 forks source link

ng build --prod fails #83

Open unnieayilliath opened 6 years ago

unnieayilliath commented 6 years ago

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

unnieayilliath commented 6 years ago

The issue is resolved by upgrading the typescript version to 2.6.2 . More details can be found here https://github.com/angular/angular/issues/20095