How to clear react-native cache?

后端 未结 13 2153
傲寒
傲寒 2020-12-02 19:49

In react-native development, there are multiple caches used when the app is built:

  1. React-native packager cache
  2. Emulator cache
  3. Java side cache
13条回答
  •  失恋的感觉
    2020-12-02 20:21

    Clearing the Cache of your React Native Project: if you are sure the module exists, try this steps:

    1. Clear watchman watches: npm watchman watch-del-all
    2. Delete node_modules: rm -rf node_modules and run yarn install
    3. Reset Metro's cache: yarn start --reset-cache
    4. Remove the cache: rm -rf /tmp/metro-*

提交回复
热议问题