File name ... differs from already included file name ... only in casing

Discussão em 'Angular' iniciado por Gibran Shah, Julho 31, 2025.

  1. Gibran Shah

    Gibran Shah Guest

    I’m getting the following error in VSCode in my Angular 6 application:

    ERROR in src/app/providers/dynamic-data/dynamic-data.service.ts(5,26): error TS1149: File name '/Users/gibranshah/repos/eva/EVA/src/app/model/endpoint.ts' differs from already included file name '/Users/gibranshah/repos/eva/EVA/src/app/model/Endpoint.ts' only in casing.


    It’s telling me that this line in dynamic-data.service.ts:

    import { Endpoint } from '../../model/endpoint';


    …refers to a file whose name is Endpoint.ts. But there is no such file. Instead, I have endpoint.ts. endpoint.ts contains a class like this:

    export class Endpoint {
    …
    }


    endpoint.ts might have been named ‘Endpoint.ts’ at one point, put it’s not anymore.

    I tried to do a find for ‘Endpoint.ts’ but came up short:

    M0168169000:gibranshah gibranshah$ find * -name "Endpoint.ts"
    M0168169000:gibranshah gibranshah$


    Does VSCode cache files? Is it possible it’s using a cached version of Endpoint.ts? How do I fix this problem?

    Continue reading...

Compartilhe esta Página