文件名...与已包含的文件名...仅在大小写上有所不同 [英] File name ... differs from already included file name ... only in casing

查看:434
本文介绍了文件名...与已包含的文件名...仅在大小写上有所不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Angular 6应用程序中的VSCode中遇到以下错误:

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.

这告诉我dynamic-data.service.ts中的这一行:

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

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

…是指名称为Endpoint.ts的文件.但是没有这样的文件.相反,我有endpoint.ts.endpoint.ts包含一个类似这样的类:

…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可能曾经被命名为"Endpoint.ts",但现在已经不复存在了.

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

我试图找到"Endpoint.ts",但很短:

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

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

VSCode是否缓存文件?是否有可能使用了Endpoint.ts的缓存版本?我该如何解决这个问题?

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

推荐答案

我遇到了类似的问题,并通过关闭文件夹解决了该问题,然后在最近的工作空间"列表上,单击底部的更多",然后从列表中单击"x".'(删除)按钮删除工作区.然后,在加载项目的文件夹后,它将正常构建.因此可能存在一些缓存,这可能是清除缓存的一种方法.

I had a similar issue and solved it by closing the folder, then on the Recent workspaces list click More at the bottom, and from the list click the 'x' (remove) button to remove the workspace. Then, after loading the project's folder, it build normally. So probably there is some cache and that is probably one way to clear it.

这篇关于文件名...与已包含的文件名...仅在大小写上有所不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆