ngx-britecharts icon indicating copy to clipboard operation
ngx-britecharts copied to clipboard

On a new install of angular 7 getting errors.

Open obiyoda opened this issue 5 years ago • 9 comments

Getting this error when running the ng serve command ERROR in node_modules/@colap-dev/ngx-britecharts/node_modules/rxjs/Subject.d.ts(24,5): error TS2416: Property 'lift' in type 'Subject<T>' is not assignable to the same property in base type 'Observable<T>'. 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'. node_modules/@colap-dev/ngx-britecharts/node_modules/rxjs/observable/dom/WebSocketSubject.d.ts(77,5): error TS2416: Property 'lift' in type 'WebSocketSubject<T>' is not assignable to the same property in base type 'AnonymousSubject<T>'. Type '<R>(operator: Operator<T, R>) => WebSocketSubject<R>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<T>'. Type 'WebSocketSubject<R>' is not assignable to type 'Observable<T>'. Types of property 'operator' are incompatible. Type 'Operator<any, R>' is not assignable to type 'Operator<any, T>'. Type 'R' is not assignable to type 'T'.

obiyoda avatar Mar 15 '19 20:03 obiyoda

Hi @obiyoda , could you please provide more info?

Knowing the Angular and Typescript version you are using would really help.

martinmanzo avatar Mar 15 '19 21:03 martinmanzo

Angular version is 7.2.0 Typescript version is 3.2.2

Below is my package.json. This is all spun up using the angular cli.

{
  "name": "ng7error",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~7.2.0",
    "@angular/common": "~7.2.0",
    "@angular/compiler": "~7.2.0",
    "@angular/core": "~7.2.0",
    "@angular/forms": "~7.2.0",
    "@angular/platform-browser": "~7.2.0",
    "@angular/platform-browser-dynamic": "~7.2.0",
    "@angular/router": "~7.2.0",
    "@colap-dev/ngx-britecharts": "^1.0.1",
    "core-js": "^2.5.4",
    "rxjs": "~6.3.3",
    "tslib": "^1.9.0",
    "zone.js": "~0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.13.0",
    "@angular/cli": "~7.3.6",
    "@angular/compiler-cli": "~7.2.0",
    "@angular/language-service": "~7.2.0",
    "@types/node": "~8.9.4",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~3.2.2"
  }
}

obiyoda avatar Mar 16 '19 16:03 obiyoda

We haven't still made the library offialy compatible with Angular 7 so that may be the issue.

Any way you can try one of this things:

  • Change the typescript version to 2.1.4.
  • Add "noStrictGenericChecks": true to your tsconfig file (https://stackoverflow.com/a/48882142/2686243).

Please let me know if any of those 2 options helped.

martinmanzo avatar Mar 18 '19 14:03 martinmanzo

Hi @obiyoda, did any of those option worked?

martinmanzo avatar Mar 21 '19 20:03 martinmanzo

Not had a chance to look at it again. Most likely won't until Saturday.

On Thu, Mar 21, 2019, 2:11 PM Martin Manzo [email protected] wrote:

Hi @obiyoda https://github.com/obiyoda, did any of those option worked?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/colapdev/ngx-britecharts/issues/29#issuecomment-475384178, or mute the thread https://github.com/notifications/unsubscribe-auth/ABfy7aHRv2X50k0JlTgYGFiqlMKl4Pr9ks5vY-dhgaJpZM4b3ONZ .

obiyoda avatar Mar 22 '19 01:03 obiyoda

Is someone working on this? @martinmanzo

eliraneliassy avatar May 26 '19 16:05 eliraneliassy

Hi @eliraneliassy , not that I'm aware of. Are you thinking on taking it?

martinmanzo avatar May 27 '19 12:05 martinmanzo

Same error here.

ERROR in node_modules/@colap-dev/ngx-britecharts/node_modules/rxjs/Subject.d.ts(24,5): error TS2416: Property 'lift' in type 'Subject<T>' is not assignable to the same property in base type 'Observable<T>'.

cabrinoob avatar Oct 24 '19 08:10 cabrinoob

Hello @cabrinoob , I didn't had the time to make the package compatible with Angular 7 so that is the issue. Would you mind making a PR?

martinmanzo avatar Oct 24 '19 16:10 martinmanzo