gpt4 book ai didi

reactjs - 添加模块时出错 : Several files providing this module

转载 作者:行者123 更新时间:2023-12-03 14:32:11 25 4
gpt4 key购买 nike

我正在尝试安装 react-native-navigation-drawer在我的项目中使用命令 yarn add react-native-navigation-drawer

执行命令后,我在运行应用程序时收到错误。

/Users/reactProject/node_modules/react-native/package.json
2017-10-16 15:10:43.664017+0200 mobilizeit[23431:100610] Ambiguous resolution: module '/Users/reactProject/index.ios.js' tries to require 'react-native', but there are several files providing this module. You can delete or fix them:

/Users/reactProject/node_modules/react-native-drawer-layout-polyfill/node_modules/react-native/package.json

/Users/reactProject/node_modules/react-native-navigation-drawer/node_modules/react-native/package.json

/Users/reactProject/node_modules/react-native-tab-view/node_modules/react-native/package.json

/Users/reactProject/node_modules/react-native/package.json

我对 react 原生非常陌生。你能帮我解决这个问题吗?编辑:

使用命令yarn start --reset-cache我收到很多如下所示的警告:

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: Sample
Paths: /Users/reactProject/node_modules/react-native-navigation-drawer/node_modules/react-native/Libraries/Sample/Sample.ios.js collides with /Users/reactProject/node_modules/react-native-drawer-layout-polyfill/node_modules/react-native/Libraries/Sample/Sample.ios.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: Settings
Paths: /Users/reactProject/node_modules/react-native-navigation-drawer/node_modules/react-native/Libraries/Settings/Settings.ios.js collides with /Users/reactProject/node_modules/react-native-drawer-layout-polyfill/node_modules/react-native/Libraries/Settings/Settings.ios.js

最佳答案

尝试这个命令

 yarn start --reset-cache

关于reactjs - 添加模块时出错 : Several files providing this module,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46771323/

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