Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 文件名。。。与已包含的文件名不同。。。仅在套管内_Angular_Caching_Visual Studio Code_Filenames - Fatal编程技术网

Angular 文件名。。。与已包含的文件名不同。。。仅在套管内

Angular 文件名。。。与已包含的文件名不同。。。仅在套管内,angular,caching,visual-studio-code,filenames,Angular,Caching,Visual Studio Code,Filenames,我在Angular 6应用程序的VSCode中遇到以下错误: 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

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

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中的这一行:

import { Endpoint } from '../../model/endpoint';
…引用名为Endpoint.ts的文件。但是没有这样的文件。相反,我有endpoint.ts。endpoint.ts包含如下类:

export class Endpoint {
…
}
endpoint.ts可能在某一点上被命名为“endpoint.ts”,也就是说它不再是了

我试图查找“Endpoint.ts”,但没有找到:

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

VSCode是否缓存文件?是否可能正在使用Endpoint.ts的缓存版本?如何解决此问题?

我遇到了一个类似的问题,通过关闭文件夹解决了它,然后在“最近的工作区”列表中单击底部的“更多”,然后从列表中单击“x”(删除)按钮删除工作区。然后,在加载项目文件夹后,它将正常生成。所以可能存在一些缓存,这可能是清除缓存的一种方法。

我遇到了这个问题,这是一个目录名大小写问题

我是这样导入我的组件的:

../proxies/test.component

../Proxies/test.component

我也有同样的问题,只是发现出于某种原因,在一些ts文件中,它被称为使用大写字母,然后我将其重命名为小写字母,它就可以工作了


您也可以尝试删除此型号ts文件并使用angular CLI再次创建。

这都是关于文件路径的,请确保它区分大小写。

这也是我的问题-我更改了在App.tsx中引用文件的方式