尝试构建我的项目时(使用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编译器尝试使用此缓存的类型定义,这可能是怎么回事?
谢谢