question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not compatible yet with Angular 6/RxJS 6

See original GitHub issue

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';

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
manfredsteyercommented, May 4, 2018

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

0reactions
manfredsteyercommented, May 12, 2018

Same as #303

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found