【问题标题】:Build error: Two different types with this name exist, but they are unrelated构建错误:存在具有此名称的两种不同类型,但它们不相关
【发布时间】:2017-05-31 01:50:29
【问题描述】:

在构建我的 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

【问题讨论】:

    标签: angular rxjs yarnpkg


    【解决方案1】:

    这让我呆了几天。为了修复它,我删除了我的 /target 目录和 yarn.lock 文件。

    【讨论】:

    • 我不得不删除 package.lock.json
    猜你喜欢
    • 1970-01-01
    • 2019-02-21
    • 2019-02-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多