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

Update RxJS dependency #609

Closed
avatsaev opened this issue Sep 11, 2017 · 8 comments
Closed

Update RxJS dependency #609

avatsaev opened this issue Sep 11, 2017 · 8 comments

Comments

@avatsaev
Copy link
Contributor

Description

Doesn't work with Angular 4.3 & Angular CLI 1.4.1

Expected Behavior

Actual Behavior

Error at compile time

ERROR in node_modules/videogular2/node_modules/rxjs/Subject.d.ts (16,22): Class 'Subject<T>' incorrectly extends base class 'Observable<T>'.
  Types of property 'lift' are incompatible.
  Type '<R>(operator: Operator<T, R>) => Observable<T>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<R>'.
    Type 'Observable<T>' is not assignable to type 'Observable<R>'.
      Type 'T' is not assignable to type 'R'.
      ERROR in node_modules/videogular2/src/core/vg-media/i-playable.d.ts (1,23): Cannot find type definition file for 'core-js'.
      ERROR in node_modules/videogular2/src/core/vg-media/vg-media.d.ts (1,23): Cannot find type definition file for 'core-js'.
      ERROR in node_modules/videogular2/src/core/services/vg-api.d.ts (1,23): Cannot find type definition file for 'core-js'.

Steps to Reproduce

If this is an issue, describe the steps you took to see the issue. If this is a feature, delete this block.

  1. Step 1
  2. Step 2

Attachments

Try to include screenshots for bugs or design assets for enhancements

Image Title
(https://media.giphy.com/media/143vPc6b08locw/giphy.gif)
Image description
@nickyxu
Copy link

nickyxu commented Sep 13, 2017

hi avatsaev,
I meet the same problem. Have you fixed it? Or, any solution?

@nickyxu
Copy link

nickyxu commented Sep 13, 2017

Hi,
It works!
My solution is:

  1. Downgrade the rxjs to V5.1.0
  2. Downgrade the typescript to V2.3.4

@avatsaev
Copy link
Contributor Author

avatsaev commented Sep 13, 2017

Hey @nickyxu, I just disabled type checking for libraries in my tsconfig, a little radical I know, but it works


  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "skipLibCheck": true,

@bopm
Copy link

bopm commented Oct 3, 2017

After some help from @Elecash with pointing out that any combination of libs not breaking that in https://github.com/videogular/videogular2-showroom/ I was able to fix the same problem by removing my local yarn.lock on my project and reinstall all dependencies. I guess same will work for package-lock.json too.

@Elecash
Copy link
Member

Elecash commented Oct 3, 2017

I can confirm that it worked for me by deleting the package-lock.json.

@Elecash Elecash closed this as completed Oct 3, 2017
@avatsaev
Copy link
Contributor Author

avatsaev commented Oct 4, 2017

Still experiencing errors when building with libCheck option:

TS 2.5
Angular 4.4
RxJS : 5.4

ERROR in node_modules/videogular2/node_modules/rxjs/Subject.d.ts (16,22): Class 'Subject<T>' incorrectly extends base class 'Observable<T>'.
Types of property 'lift' are incompatible.
Type '<R>(operator: Operator<T, R>) => Observable<T>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<R>'.
Type 'Observable<T>' is not assignable to type 'Observable<R>'.
Type 'T' is not assignable to type 'R'.

@bopm
Copy link

bopm commented Oct 4, 2017

@avatsaev according to that there is no Angular 4 support for TS version bigger than 2.3 and never will be.

@avatsaev
Copy link
Contributor Author

avatsaev commented Oct 5, 2017

Yep, that turned out to be the problem, thank you.

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

4 participants