-
Notifications
You must be signed in to change notification settings - Fork 10
Description
When serving the angular application using Angular 6 CLI, the app fails to compile, giving the following error message:
ERROR in node_modules/angular-typing-animation/typing-animation.directive.d.ts(3,10): error TS2305: Module '"..../node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/angular-typing-animation/typing-animation.directive.d.ts(4,10): error TS2305: Module '"....node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
node_modules/rxjs/Subscription.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subscription'.
This can be solved by changing line 3 in the typing-animation.directive.js file from:
import { Observable } from 'rxjs/Observable';
to simply:
import { Observable } from 'rxjs';
AND changing lines 3 and 4 in typing-animation.directive.d.ts from:
import { Observable } from 'rxjs/Observable';
import { Subscription } from 'rxjs/Subscription';
to
import { Observable } from 'rxjs';
import { Subscription } from 'rxjs';