omars94 / BAU-Events

Other
0 stars 1 forks source link

error: bundling failed: Error: Unable to resolve module `module` from `/Users/Folder/MyProject/node_modules/source-map-support/source-map-support.js`: Module `module` does not exist in the Haste module map #12

Closed pavanMude closed 4 years ago

pavanMude commented 4 years ago

error: bundling failed: Error: Unable to resolve module module from /Users/Folder/MyProject/node_modules/source-map-support/source-map-support.js: Module module does not exist in the Haste module map

  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-*. at ModuleResolver.resolveDependency (/Users/Folder/MyProject/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:183:15) at ResolutionRequest.resolveDependency (/Users/Folder/MyProject/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18) at DependencyGraph.resolveDependency (/Users/Folder/MyProject/node_modules/metro/src/node-haste/DependencyGraph.js:283:16) at Object.resolve (/Users/Folder/MyProject/node_modules/metro/src/lib/transformHelpers.js:261:42) at dependencies.map.result (/Users/Folder/MyProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:399:31) at Array.map (<anonymous>) at resolveDependencies (/Users/Folder/MyProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:396:18) at /Users/Folder/MyProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:269:33 at Generator.next (<anonymous>) at asyncGeneratorStep (/Users/Folder/MyProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24)

I tried all the solution like the following:

  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-*.

I even downgraded babel/core(to 7.4.4 from 7.7.7) and source-map-support(to 0.4.3 from 0.5.4 version) as per the suggestions posted in the GitHub channel, however I tried all the possible ways and of no use, still it won't seems to work. I hope I will find the solution with this question.

"react-native": "^0.59.9", "react": "^16.8.6",