zurfyx / angular-contents

Angular 5 Table of Contents that follows you while you scroll down
https://zurfyx.github.io/angular-contents
MIT License
40 stars 10 forks source link

ng build fails with rxjs and index.ts errors #10

Closed kt215 closed 5 years ago

kt215 commented 5 years ago

I'm using Angular 7.2.9, after installing angular-contents 7.0.0 I try ng build and get this error:

ERROR in node_modules/angular-contents/src/contents-link.directive.ts(10,10): error TS2305: Module '"../../rxjs/Subject"' has no exported member 'Subject'.
node_modules/angular-contents/src/contents-section.directive.ts(11,10): error TS2305: Module '"../../rxjs/Subject"' has no exported member 'Subject'.
node_modules/angular-contents/src/contents.directive.ts(2,10): error TS2305: Module '"../../rxjs/Observable"' has no exported member 'Observable'.
node_modules/angular-contents/src/contents.directive.ts(3,10): error TS2305: Module '"../../rxjs/Subject"' has no exported member 'Subject'.
node_modules/angular-contents/src/contents.directive.ts(4,10): error TS2305: Module '"../../rxjs/BehaviorSubject"' has no exported member 'BehaviorSubject'.
node_modules/rxjs/BehaviorSubject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/BehaviorSubject'.
node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
node_modules/rxjs/Subject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subject'.

If I install rxjs-compat 6.3.3 (which I want to avoid) I get this error:

ERROR in ./node_modules/angular-contents/src/index.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /node_modules/angular-contents/src/index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package
aadvark-pancakes commented 4 years ago

Hey @kt215 how did you solve this issue?

kt215 commented 4 years ago

I didn't solve it, I ended up not using angular-contents, and just closed this issue.