首页 文章

Haste模块映射中不存在模块`DatePickerIOS`

提问于
浏览
7

在运行ReactNative Android应用程序时获取下面的Exception以及Bundle时,获得相同的异常 .

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android / app / src / main / assets / index.android.bundle --assets-dest android / app / src /主/ RES /

Unable to resolve module DatePickerIOS from Project_Path/node_modules/react-native/Libraries/react-native/react-native-implementation.js: Module DatePickerIOS does not exist in the Haste module map

请帮我解决这个问题 .
enter image description here

Package.json: "dependencies":{"react":"16.3.1","react-native":"0.55.2","react-native-calendars":"1.17.7","react-native-carousel-view":"0.5.1","react-native-confirmation-code-input":"1.0.4","react-native-dash":"0.0.8","react-native-elements":"0.19.1","react-native-fbsdk":"0.7.0","react-native-google-places-autocomplete":"1.3.6","react-native-google-sign-in":"1.0.16","react-native-i18n":"2.0.12","react-native-indicators": "0.12.0","react-native-maps":"0.21.0","react-native-material-bottom-navigation":"0.9.0","react-native-material-dropdown":"0.11.1","react-native-material-ui":"1.22.1","react-native-modalbox":"1.4.2","react-native-searchbar":"1.14.0","react-native-sensitive-info":"5.1.0","react-native-splash-screen":"3.0.6","react-native-vector-icons":"4.6.0","react-navigation":"1.5.11","react-native-tab-view":"0.0.77","react-native-global-props":"1.1.3"}

3 回答

  • 1

    在Metro bundler终端窗口中终止进程,然后在注释中指出运行 npm start -- --reset-cache

  • 18

    我遇到这个问题怎么了

    我两次遇到这个问题,

    我第一次错误地导入了一个js包,当它没有安装时,它通过删除那个错误的import语句解决了

    第二次我试图安装'react-native-modal-overlay'包,而不是使用npm安装,我使用纱线添加react-native-modal-overlay,

    我开始遇到这个问题

    尝试了我可以在网上找到的所有步骤,但没有解决,最后,我在另一个包中重新安装了存储库,-----然后构建失败,

    • 然后我运行npm缓存清理,(结果要求运行命令'npm install --cache / tmp / empty-cache' - 我运行此命令,然后尝试使构建成功
  • 0

    如果以上接受的答案在这种情况下不起作用 . 简单地用

    npm install DatePickerIOS
    

    任何lib都可以发生上述问题,然后简单地使用

    npm install "Error module name"
    

相关问题