Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 6: Error: Module Not Found #8

Open
zbayoff opened this issue Aug 17, 2018 · 5 comments
Open

Angular 6: Error: Module Not Found #8

zbayoff opened this issue Aug 17, 2018 · 5 comments

Comments

@zbayoff
Copy link

zbayoff commented Aug 17, 2018

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

@InsaneNaman
Copy link

+1 @zbayoff

1 similar comment
@rlipka
Copy link

rlipka commented Oct 4, 2018

+1 @zbayoff

@VladimirAntin
Copy link

Hi,
ng-typed

@ddtch
Copy link

ddtch commented Oct 24, 2019

@VladimirAntin Thank you Goku! )))) KAMEHAMEHAAAAAAAAAAA!!!

@ThatNerdyFrog
Copy link

ThatNerdyFrog commented Apr 26, 2023

I know this is an old thread but the solutions mostly worked, I've still got:

Error: Failed to initialize Angular compilation - The target entry-point "angular-typing-animation" has missing dependencies:

  • rxjs/Observable

I made the changes you had made and it just seems like there's a fourth /Observable, if anyone has kept up to date please let me know. Thank you!

EDIT:
Found the answer to my own question, in the current build find you still have to have to do what the original post says, but there's also a "bundle" folder with:

angular-typing-animation.umd
angular-typing-animation.umd.min

Files. Go into both of these and search for "rxjs/Observable" and remove the Observable as with everything else. For the .umd it should be ln2-3, but for the .min file you'll need to use the search option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants