gpt4 book ai didi

react-native - 以下文件共享它们的名称;请调整你的 hasteImpl : * \package. json * \sanity\package.json

转载 作者:行者123 更新时间:2023-12-05 03:20:47 24 4
gpt4 key购买 nike

这是我第一次使用 sanity,我遇到了这个问题,在运行 expo start 时,如果你能帮助我,我将非常感谢

jest-haste-map: Haste module naming collision: deliveroo-clone
The following files share their name; please adjust your hasteImpl:
* <rootDir>\package.json
* <rootDir>\sanity\package.json

Failed to construct transformer: DuplicateError: Duplicated files or mocks. Please check the
console for more info
at setModule (C:\Users\Slima\Desktop\deliveroo-clone\node_modules\jest-haste-
map\build\index.js:576:17)
at workerReply (C:\Users\Slima\Desktop\deliveroo-clone\node_modules\jest-haste-
map\build\index.js:647:9)
at async Promise.all (index 10)
at C:\Users\Slima\Desktop\deliveroo-clone\node_modules\jest-haste-map\build\index.js:459:22
at Function.load (C:\Users\Slima\Desktop\deliveroo-clone\node_modules\metro\src\node-
haste\DependencyGraph.js:86:36)
at Bundler.ready (C:\Users\Slima\Desktop\deliveroo-
clone\node_modules\metro\src\Bundler.js:61:5)
at IncrementalBundler.ready (C:\Users\Slima\Desktop\deliveroo-
clone\node_modules\metro\src\IncrementalBundler.js:309:5)
at Server.ready (C:\Users\Slima\Desktop\deliveroo-
clone\node_modules\metro\src\Server.js:1156:5) {
mockPath1: 'package.json',
mockPath2: 'sanity\\package.json'
}`
Unrecognized event: {"type":"transformer_load_failed","error":

{"mockPath1":"package.json","mockPath2":"sanity\package.json","name":"Error","message":"Duplicated 文件或模拟。请检查控制台以获取更多信息","stack":"Error: Duplicated files or mock 。请检查控制台以获取更多信息\nsetModule (C:\Users\Slima\Desktop\deliveroo-clone\node_modules\jest-haste-map\build\index.js:576:17)\n 在 workerReply (C:\Users\Slima\Desktop\deliveroo-clone\node_modules\jest-haste-map\build\index.js:647:9)\n 在异步 Promise.all(索引10)\n 在 C:\Users\Slima\Desktop\deliveroo-clone\node_modules\jest-haste-map\build\index.js:459:22\n 在 Function.load (C:\Users\Slima\Desktop\deliveroo-克隆\node_modules\metro\src\node-haste\DependencyGraph.js:86:36)\n 在 Bundler.ready(C:\Users\Slima\Desktop\deliveroo-clone\node_modules\metro\src\Bundler.js:61:5)\n
在 IncrementalBundler.ready (C:\Users\Slima\Desktop\deliveroo-克隆\node_modules\metro\src\IncrementalBundler.js:309:5)\n at Server.ready(C:\Users\Slima\Desktop\deliveroo-clone\node_modules\metro\src\Server.js:1156:5)"}}`

最佳答案

我在 React-native 和 Sanity 项目中遇到了同样的问题。

我找到的唯一解决方案是创建文件夹“server”和“client”。将所有 sanity 文件夹/文件拖到“服务器”文件夹,将所有其他文件拖到“客户端”文件夹。

注意:只需 cd 进入“client”文件夹来运行 react-native 项目,然后 cd 到“server”文件夹来运行 sanity start

关于react-native - 以下文件共享它们的名称;请调整你的 hasteImpl : * <rootDir>\package. json * <rootDir>\sanity\package.json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73085214/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com