构建错误:存在两个具有此名称的不同类型,但它们不相关

时间:2017-05-31 01:50:30

标签: 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 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>'.

我遇到this project的问题。

完整的Travis构建错误为here

1 个答案:

答案 0 :(得分:3)

这让我有几天了。为了解决这个问题,我删除了/target目录和yarn.lock文件。