How to clear react-native cache?
Solution 1:
For React Native Init approach (without expo) use:
npm start -- --reset-cache
Solution 2:
Simplest one(react native,npm and expo )
For React Native
react-native start --reset-cache
for npm
npm start -- --reset-cache
for Expo
expo start -c
Solution 3:
Clearing the Cache of your React Native Project:
npm < 6.0 and RN < 0.50:
watchman watch-del-all && rm -rf $TMPDIR/react-* &&
rm -rf node_modules/ && npm cache clean && npm install &&
npm start -- --reset-cache
npm >= 6.0 and RN >= 0.50:
watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* &&
rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean --force &&
npm install && npm start -- --reset-cache
Solution 4:
try this
react-native start --reset-cache
Solution 5:
For those who are using expo-cli
expo start -c