React Native clear cache
Often it has been posted in different places but everybody is using different techniques and so am I. Therefore, here's my snippet of clearing the "React Native" cache which is basically a drop of all temp dir's combined with a npm cache clear.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-* && npm cache clean --force && npm cache verify && rm -rf ios/build && rm -rf node_modules/ && npm i |
This is working on my MBP with MacOS Mojave.
PS: I faced a problem while upgrading from react-redux 5.1.0 to react-redux 6.0.0 which requires a drop of the cached files.