Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build error: Two different types with this name exist, but they are unrelated

I get this error when building my JHipster Angular project

[ERROR] Error at /Users/Dan/work/gba/node_modules/ng-jhipster/src/interceptor/interceptable-http.d.ts:4:22: Class 'InterceptableHttp' incorrectly extends base class 'Http'.
[ERROR]   Types of property 'request' are incompatible.
[ERROR]     Type '(url: string | Request, options?: RequestOptionsArgs) => Observable<Response>' is not assignable to type '(url: string | Request, options?: RequestOptionsArgs) => Observable<Response>'. Two different types with this name exist, but they are unrelated.
[ERROR]       Type 'Observable<Response>' is not assignable to type 'Observable<Response>'. Two different types with this name exist, but they are unrelated.
[ERROR]         Property 'source' is protected but type 'Observable<T>' is not a class derived from 'Observable<T>'.

I am having this problem with this project.

The full Travis build error is here

like image 654
Dan Cancro Avatar asked Oct 18 '22 11:10

Dan Cancro


1 Answers

This had me for a few days. To fix it I deleted my /target directory and yarn.lock file.

like image 119
Dan Cancro Avatar answered Nov 12 '22 21:11

Dan Cancro