dhj
dhj

Reputation: 4805

module redux does not exist in the haste module map

I have recently updated my react-native App to the 2.x series using the following guide;

https://github.com/react-community/create-react-native-app/blob/master/CHANGELOG.md#upgrading-from-1140-to-201

However when I run a build to a simulator or device I get an error about the redux module not being in the haste module map.

This issue might manifest itself as other missing modules, so the first part of the answer below, without the redux addition should help in that case.

Upvotes: 2

Views: 4331

Answers (1)

dhj
dhj

Reputation: 4805

Firstly;

watchman watch-del-all
rm -rf node_modules && npm install
rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache
rm -rf /tmp/haste-map-react-native-packager-*

Reset the simulator(s) also if using.

Then run

npm install
npm install --save redux

Then run a build (Note its changed in expo 2.x)

expo build

I think in my particular case I was using redux without the dependency being expressly outlined in the package.json, or that it had been removed as a dependency of another source, but the above steps should help in most cases.

Upvotes: 3

Related Questions