Angular-oauth2-oidc: Not compatible yet with Angular 6/RxJS 6

Created on 4 May 2018  路  6Comments  路  Source: manfredsteyer/angular-oauth2-oidc

I've generated a new project with the latest version of the Angular CLI (6.0.0) and then installed angular-oath2-oidc. As soon I try to run the project, I get a compile error:

ERROR in node_modules/angular-oauth2-oidc/interceptors/default-oauth.interceptor.d.ts(3,10): error TS2305: Module '"[...]authtest/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/angular-oauth2-oidc/interceptors/resource-server-error-handler.d.ts(2,10): error TS2305: Module '"[...]authtest/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/angular-oauth2-oidc/oauth-service.d.ts(2,10): error TS2305: Module '"[...]authtest/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.

Now, it's been one whole day since the release of Angular 6, so it's completely understable. No problems when simply using Angular 5.

As for a fix, in interceptors/resource-server-error-handler.ts, interceptors/default-oauth.interceptor.ts and oauth-service.ts, change this import:

import { Observable } from 'rxjs/Observable';

to this import:

import { Observable } from 'rxjs';

Most helpful comment

Thx. My goal is to provide a new version within a week.

All 6 comments

Added pull request #300

Thx. My goal is to provide a new version within a week.

I am also looking of for this ASAP and it breaking my app.
/shiv

Can we hurry merge proccess?

It's on is way.

Same as #303

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CharlyRipp picture CharlyRipp  路  3Comments

kneefer picture kneefer  路  3Comments

uzzafar picture uzzafar  路  4Comments

prmces picture prmces  路  4Comments

zulander1 picture zulander1  路  4Comments