Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module `DatePickerIOS` does not exist in the Haste module map

While running ReactNative Android app getting the below Exception and also while Bundle, getting the same exception.

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/main/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

Kindly help me to resolve this.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" }

like image 210
Tech Mahesh Avatar asked Apr 17 '18 05:04

Tech Mahesh


2 Answers

Terminate the process in the Metro bundler terminal window, and then as pointed out in the comments run npm start -- --reset-cache

like image 154
AndrewHenderson Avatar answered Nov 03 '22 23:11

AndrewHenderson


What happened with me for this problem,

I encountered this problem twice,

first time i mistakenly imported a js package when it was not installed, it resolved by removing that mistaken import statement

second time i was trying to install 'react-native-modal-overlay' package, and instead of using npm install, i used yarn add react-native-modal-overlay,

and I started getting this problem

tried all steps i could find on net, but not resolved, finally, I took a fresh install of repository in another package, -----then also the build failed, t

-- then i ran npm cache clean, ( the result asked to run command 'npm install --cache /tmp/empty-cache' -- i ran this command, and then tried to make build it succeeded

like image 22
Akshay Vijay Jain Avatar answered Nov 04 '22 01:11

Akshay Vijay Jain