10
votes

Seen in my Metro Bundler console output:

Error: Cannot find module 'jest-haste-map'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (D:/Reat Native demo/kindbase-foodli-app-935bb0d21eae/

node_modules/react-native/packager/react-packager/src/node-haste/index.js:19:22)

I make a new project. But I run the react-native run-android and the issue still persists?

3

3 Answers

16
votes

Try to uninstall react-native from node_module folder using command

npm uninstall react-native

and then re-install that module using command

npm install react-native

And run your app.

1
votes

open the file rn-cli.config.js and change it to the following :)

const blacklist = require('metro-config/src/defaults/blacklist');
module.exports = {
  resolver: {
    blacklistRE: blacklist()
  }
};
1
votes

I reported this on the GitHub repo https://github.com/facebook/react-native/issues/21146

I had to

rm -rf node_modules npm install

to make it work