Skip to content

react-native 清理缓存[mac] #4

@timi-black

Description

@timi-black
  1. Clear watchman watches:

    watchman watch-del-all

  2. Delete the node_modules folder:

    sudo rm -rf node_modules && npm install

    sudo rm -rf node_modules && yarn

  3. Reset Metro Bundler cache:

    rm -rf /tmp/metro-bundler-cache-* or npm start -- --reset-cache

  4. Remove haste cache:

    rm -rf /tmp/haste-map-react-native-packager-*

5.进入ios中执行 pod install否则会报以下错误

Unhandled JS Exception: Invariant Violation: requireNativeComponent: "RNCWKWebView" was not found in the UIManager.

This error is located at:
    in RNCWKWebView (at WebView.ios.js:289)
    in RCTView (at View.js:35)
    in View (at WebView.ios.js:292)
    in WebView (at Canvas.js:154)
    in RCTView (at View.js:35)
    in View (at Canvas.js:153)
    in Canvas (at App.js:86)
    in RCTView (at View.js:35)
    in View (at App.js:84)
    in RCTView (at View.js:35)
    in View (created by Portal.Host)
    in Portal.Host (created by Provider)
    in ThemeProvider (created by Provider)
    in LocaleProvider (created by Provider)
    in Provider (at App.js:83)
    in App (at renderApplication.js:40)
    in RCTView (at View.js:35)
    in View (at AppContainer.js:98)
    in RCTView (at View.js:35)
    in View (at AppContainer.js:115)
    in AppContainer (at renderApplication.js:39)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions