相关疑难解决方法(0)

错误TS6200:以下标识符的定义与另一个文件(@ types / jasmine)中的标识符冲突

尝试构建我的项目时(使用Angular CLI),我收到以下错误

ERROR in ../my-app/node_modules/@types/jasmine/index.d.ts(18,1): error TS6200: Definitions of the following identifiers conflict with those in another file: Expected, SpyObjMethodNames, clock, CustomEqualityTester, CustomMatcherFactory, ExpectationFailed, SpecFunction, SpyObj, jasmine
Run Code Online (Sandbox Code Playgroud)

我正在使用VSCode,当我转到有问题的行时,我可以选择查看与它冲突的文件。

这会将我带到以下位置的文件:

/Users/<user_name>/Library/Caches/typescript/3.3/node_modules/@types/jasmine/ts3.1/index.d.ts

我有点不明白为什么TS编译器尝试使用此缓存的类型定义,这可能是怎么回事?

谢谢

jasmine typescript angular

7
推荐指数
2
解决办法
2342
查看次数

标签 统计

angular ×1

jasmine ×1

typescript ×1