这个问题发生在部署sanity到我的项目之后(我不知道它是否是问题的根源,但只是想分享它。)[这是我在模拟器中看到的](https://i.stack.imgur.com/otbGz.png),下面是终端中显示的内容:
Error: Duplicated files or mocks. Please check the console for more info
at setModule (/home/faisalmwy/development/react-native/food-delivery/node_modules/metro-file-map/src/index.js:553:17)
at workerReply (/home/faisalmwy/development/react-native/food-delivery/node_modules/metro-file-map/src/index.js:624:9)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 27260)
at /home/faisalmwy/development/react-native/food-delivery/node_modules/metro-file-map/src/index.js:395:22
at DependencyGraph.ready (/home/faisalmwy/development/react-native/food-delivery/node_modules/metro/src/node-haste/DependencyGraph.js:94:5)
at Bundler.ready (/home/faisalmwy/development/react-native/food-delivery/node_modules/metro/src/Bundler.js:75:5)
at IncrementalBundler.ready (/home/faisalmwy/development/react-native/food-delivery/node_modules/metro/src/IncrementalBundler.js:327:5)
at Server.ready (/home/faisalmwy/development/react-native/food-delivery/node_modules/metro/src/Server.js:1247:5)
我以前也搜索过这个问题,有人说删除package-lock.json
和node_modules
,但没有成功。其他人说一起重新安装npm。那也没有成功。我也试过在不同的本地主机上运行这个应用程序,因为有时我和我的一个朋友同时连接。
1条答案
按热度按时间fcg9iug31#
您是否尝试过停止应用程序并执行以下过程:
cd android
和gradlew clean
node_modules
和package-lock.json
npm i