Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am trying to run existing expo project. I've cloned it and ran yarn and then expo start. and got this error:

Unable to resolve module scheduler from /path-to-project/node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-prod.js: Module scheduler does not exist in the Haste module map

This might be related to https://github.com/facebook/react-native/issues/4968

Tried to solve it by:

  1. Clear watchman watches: watchman watch-del-all.
  2. Delete the node_modules folder: rm -rf node_modules && npm install.
  3. Reset Metro Bundler cache: rm -rf /tmp/metro-bundler-cache-* or npm start -- --reset-cache.
  4. Remove haste cache: rm -rf /tmp/haste-map-react-native-packager-*.
  5. deleted and cloned project again multiple times
  6. deleted node_modules and reinstalled
  7. reinstalled watchman, npm and updated brew.
  8. Installed latest version of schedule package (0.5.0) instead of (0.4.0)

Clues: When trying to run iOS simulator, the budling gets stuck at %99

Building JavaScript bundle [================================= ] 99%

after that:

Failed building JavaScript bundle.
like image 491
Mo Algh Avatar asked Sep 26 '19 15:09

Mo Algh


1 Answers

Solved by adding those versions into my project.

"expo": "^35.0.0",
"react": "16.8.3",
"react-dom": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
"react-native-web": "^0.11.7"

However, I got other issues by updating expo version.

like image 130
Mo Algh Avatar answered Sep 28 '22 01:09

Mo Algh