emonney / QuickApp

ASP.NET Core / Angular startup project template with complete login, user and role management. Plus other useful services for Quick Application Development
https://www.ebenmonney.com/quickapp
MIT License
1.26k stars 594 forks source link

Typescript errors on demo load #12

Closed CD1010 closed 7 years ago

CD1010 commented 7 years ago

I get these errors launching project as is in VS 2017. I upgraded VS 2017 Tried updating all versions using npm check updates.

ERROR in [at-loader] ./node_modules/rxjs/Subject.d.ts:16:22 TS2415: Class 'Subject' incorrectly extends base class 'Observable'. Types of property 'lift' are incompatible. Type '(operator: Operator<T, R>) => Observable' is not assignable to type '(operator: Operator<T, R>) => Observable'. Type 'Observable' is not assignable to type 'Observable'. Type 'T' is not assignable to type 'R'. ERROR in [at-loader] ./node_modules/rxjs/observable/dom/WebSocketSubject.d.ts:24:22 TS2415: Class 'WebSocketSubject' incorrectly extends base class 'AnonymousSubject'. Types of property 'lift' are incompatible. Type '(operator: Operator<T, R>) => WebSocketSubject' is not assignable to type '(operator: Operator<T, R>) => Observable'. Type 'WebSocketSubject' is not assignable to type 'Observable'. 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'.

ayuceman commented 7 years ago

I am facing the same error, any solution to this, tried npm update and updated typescript as well?

CD1010 commented 7 years ago

I have typescript 2.2. No luck with npm update

raymondcsmit commented 7 years ago

In package.json file change "typescript": "2.3.4",
It work for me

ayuceman commented 7 years ago

Added "noStrictGenericChecks": true to the tsconfig compiler options and it worked for me.

CD1010 commented 7 years ago

I ended up changing the typescript : ^2.4.1 and setting noStrictGenericChecks: true.
It was the generic checks, as version alone did not help me. Thanks for the help

emonney commented 7 years ago

Typescript 2.4.0 works fine. I'll stick to this version until RxJs fixes it. package.json now uses strict versions (no carets). This is to prevent updates such as this from breaking the template