【发布时间】:2022-01-22 21:13:58
【问题描述】:
我们先看看错误:
jest-haste-map: Haste module naming collision: @stevemoretz/yoohoo
The following files share their name; please adjust your hasteImpl:
* <rootDir>/.yalc/@stevemoretz/yoohoo-ratchet-expo/.yalc/package-name2/package.json
* <rootDir>/.yalc/package-name1/package.json
Failed to construct transformer: DuplicateError: Duplicated files or mocks. Please check the console for more info
at setModule (/Volumes/HDD/ReactNative/upgrade/store/node_modules/jest-haste-map/build/index.js:543:17)
at workerReply (/Volumes/HDD/ReactNative/upgrade/store/node_modules/jest-haste-map/build/index.js:614:9)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Promise.all (index 27)
at /Volumes/HDD/ReactNative/upgrade/store/node_modules/jest-haste-map/build/index.js:426:22 {
mockPath1: '.yalc/package-name1/.yalc/@stevemoretz/yoohoo/package.json',
mockPath2: '.yalc/package-name2/package.json'
}
发生了什么事?我在另一个 yalc 包中使用了嵌套的 yalc 包,所以出现此错误,我该如何解决?
【问题讨论】:
标签: react-native expo yalc