Not compatible yet with Angular 6/RxJS 6
See original GitHub issueI’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';
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Angular 6: Upgrading API calls to RxJS 6 - Metal Toad
First a note for anyone upgrading from Angular 4 or 5. Don't panic! There is a library called 'rxjs-compat' which provides shims for...
Read more >Angular 5 to 6 Without Backward Compatible RxJS (rxjs-compat)
I'm involved in the rather arduous task of migrating a project from Angular 5.2.11 to 6.0.0, and I'm having some difficulty with RxJS...
Read more >Angular 6 Upgrade: Migrating to RxJS 6 - Techiediaries
First, you need to make sure that you are using the latest version (RxJS 5.5) in your project. If that's not the case...
Read more >Compatibility with Angular 6 / RxJs v6 · Issue #1255 - GitHub
Angular 6 has dependency on RxJs 6. RxJs 6 require a pipeable operators. Generated AngularClient files use at moment "old" style and should...
Read more >RxJS 6 - What Changed? - Academind
RxJS 6 is mostly used in Angular apps, and starting with Angular 6, it's a mandatory dependency there. Learn more about the Angular...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thx. My goal is to provide a new version within a week.
Same as #303