Angular 生成错误:存在两个具有此名称的不同类型,但它们不相关
我在构建JHipster Angular项目时遇到此错误Angular 生成错误:存在两个具有此名称的不同类型,但它们不相关,angular,rxjs,yarnpkg,Angular,Rxjs,Yarnpkg,我在构建JHipster Angular项目时遇到此错误 [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 incomp
[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>'.
[ERROR]错误位于/Users/Dan/work/gba/node_modules/ng jhipster/src/interceptor/interceptable http.d.ts:4:22:Class'InterceptableHttp'错误地扩展了基类'http'。
[错误]属性“请求”的类型不兼容。
[ERROR]Type'(url:string |请求,选项?:RequestOptionsArgs)=>Observable'不可分配给Type'(url:string |请求,选项?:RequestOptionsArgs)=>Observable'。存在两种具有此名称的不同类型,但它们不相关。
[错误]类型“Observable”不可分配给类型“Observable”。存在两种具有此名称的不同类型,但它们不相关。
[错误]属性“source”受保护,但类型“Observable”不是从“Observable”派生的类。
我有这个问题
Travis的完整构建错误是这让我有好几天的时间。为了修复它,我删除了我的
/target
目录和warn.lock
文件。我不得不删除package.lock.json