Microsoft-authentication-library-for-js: MSAL for Angular not updated with RXJS changes

Created on 14 Aug 2018  路  10Comments  路  Source: AzureAD/microsoft-authentication-library-for-js

RxJS is updated and the code needs to be updated


ERROR in ./node_modules/@azure/msal-angular/dist/broadcast.service.js
Module not found: Error: Can't resolve 'rxjs/BehaviorSubject' in 'D:\Projects\Poseidon-Next User Experience\Work\UX.Entitlements\Applications\scope-management\node_modules\@azure\msal-angular\dist'
ERROR in ./node_modules/@azure/msal-angular/dist/msal.interceptor.js
Module not found: Error: Can't resolve 'rxjs/Observable' in 'D:\Projects\Poseidon-Next User Experience\Work\UX.Entitlements\Applications\scope-management\node_modules\@azure\msal-angular\dist'
ERROR in ./node_modules/@azure/msal-angular/dist/msal.interceptor.js
Module not found: Error: Can't resolve 'rxjs/add/observable/fromPromise' in 'D:\Projects\Poseidon-Next User Experience\Work\UX.Entitlements\Applications\scope-management\node_modules\@azure\msal-angular\dist'
ERROR in ./node_modules/@azure/msal-angular/dist/msal.service.js
Module not found: Error: Can't resolve 'rxjs/add/observable/of' in 'D:\Projects\Poseidon-Next User Experience\Work\UX.Entitlements\Applications\scope-management\node_modules\@azure\msal-angular\dist'
ERROR in ./node_modules/@azure/msal-angular/dist/msal.service.js
Module not found: Error: Can't resolve 'rxjs/add/operator/delay' in 'D:\Projects\Poseidon-Next User Experience\Work\UX.Entitlements\Applications\scope-management\node_modules\@azure\msal-angular\dist'
ERROR in ./node_modules/@azure/msal-angular/dist/msal.service.js
Module not found: Error: Can't resolve 'rxjs/add/operator/do' in 'D:\Projects\Poseidon-Next User Experience\Work\UX.Entitlements\Applications\scope-management\node_modules\@azure\msal-angular\dist'
ERROR in ./node_modules/@azure/msal-angular/dist/msal-guard.service.js
Module not found: Error: Can't resolve 'rxjs/add/operator/filter' in 'D:\Projects\Poseidon-Next User Experience\Work\UX.Entitlements\Applications\scope-management\node_modules\@azure\msal-angular\dist'
ERROR in ./node_modules/@azure/msal-angular/dist/broadcast.service.js
Module not found: Error: Can't resolve 'rxjs/add/operator/filter' in 'D:\Projects\Poseidon-Next User Experience\Work\UX.Entitlements\Applications\scope-management\node_modules\@azure\msal-angular\dist'
ERROR in ./node_modules/@azure/msal-angular/dist/broadcast.service.js
Module not found: Error: Can't resolve 'rxjs/add/operator/map' in 'D:\Projects\Poseidon-Next User Experience\Work\UX.Entitlements\Applications\scope-management\node_modules\@azure\msal-angular\dist'
ERROR in ./node_modules/@azure/msal-angular/dist/msal.interceptor.js
Module not found: Error: Can't resolve 'rxjs/add/operator/mergeMap' in 'D:\Projects\Poseidon-Next User Experience\Work\UX.Entitlements\Applications\scope-management\node_modules\@azure\msal-angular\dist'
ERROR in ./node_modules/@azure/msal-angular/dist/msal-guard.service.js
Module not found: Error: Can't resolve 'rxjs/add/operator/pairwise' in 'D:\Projects\Poseidon-Next User Experience\Work\UX.Entitlements\Applications\scope-management\node_modules\@azure\msal-angular\dist'

Library version


Library version: @azure/[email protected]



## Current behavior
Throwing errors for improper usage of observables. 


## Expected behavior
The library should work as expected


## Minimal reproduction of the problem with instructions
Install the package via NPM and add to the app module. 


enhancement msal-angular

Most helpful comment

@nehaagrawal Angular 7 has removed support for rxjs 5 thus adding rxjs-compat will not work. What are the chances of actually removing the dependency on fromPromise ? Afaik this is the only piece of code thats complaining.

I currently cannot use msal-angular with angular 7 :(

All 10 comments

@tipsanemonk I had the same issue - was able to get around it for now by adding rxjs-compat to my application.

@RobARichardson Yes, in fact, I did the same to get my app running but I believe, this should come with the library dependency at least.

@RobARichardson @tipsanemonk rxjs 6.0 has breaking change (rxjs-breaking) and hence the issue. we are currently on rxjs 5.0.1.I will check if I can add rxjs-compat as a dependency on our side.

@nehaagrawal Angular 7 has removed support for rxjs 5 thus adding rxjs-compat will not work. What are the chances of actually removing the dependency on fromPromise ? Afaik this is the only piece of code thats complaining.

I currently cannot use msal-angular with angular 7 :(

  • would like to see this fixed to use this great package

Is there any way to make it work with Angular 7+ ?

@ccaymaz this is on my todo list, will get back at this as soon as I have figured it out.

Thank you @maurei for your reply. Looking forward to migrate my application to msal-angular.

(im not part of MSAL team, so it will probably be an ugly work around :) )

Closing as duplicate. Please track this related issue #421 and the PR.

Was this page helpful?
0 / 5 - 0 ratings