【发布时间】:2022-10-06 17:20:30
【问题描述】:
Testcafe 无法使用yarn pnp 编译我的测试,通过在.yarnrc 中设置这两个属性切换到yarn pnp 后遇到以下错误:
nodeLinker: \"pnp\"
pnpMode: \"strict\"
错误信息:
code: \'E1035\'
Error: TypeScript compilation failed.
C:/testcafe/test.ts (13, 17): File name
\'C:/testcafe/.yarn/cache/testcafe-npm-2.0.0-395078fea1-9192f88fb7.zip/node_modules/testcafe/ts-defs/index.d.ts\'
differs from already included file name
\'c:/testcafe/.yarn/cache/testcafe-npm-2.0.0-395078fea1-9192f88fb7.zip/node_modules/testcafe/ts-defs/index.d.ts\' only in casing.
The file is in the program because:
Root file specified for compilation
Imported via \'testcafe\' from file \'C:/testcafe/test.ts\' with packageId \'testcafe/ts-defs/index.d.ts@2.0.0\'
forceConsistentCasingInFileNames: false 不能用作解决方法,因为它不是文件而是路径名
标签: typescript testing testcafe yarnpkg-v2 yarn-v2