Unhandled JS Exception: Requiring unknown module "104"

Viewed 3404

I have installed React Native Highcharts but while importing the module:

import HighchartsReactNative from '@highcharts/highcharts-react-native';

Getting error Unhandled JS Exception: Requiring unknown module "104". If you are sure the module exists, try restarting Metro. You may also want ti run 'Yarn' or 'npm install' importing the module I got the above error.

I have already restarted the Metro bundler and restarted many times but did not worked.

2 Answers
  • Ensure the module is installed by checking the folder node_modules/@highcharts/highcharts-react-native

    • If it is missing, install it with yarn add @highcharts/highcharts-react-native or npm install --save @highcharts/highcharts-react-native
  • Clear metro cache with watchman watch-del-all and rm -rf $TMPDIR/metro-bundler-cache-*

  • Restart the bundler resetting the cache with yarn start --reset-cache or npm run start --reset-cache

  • Reload the bundle in your app (shake and press Restart on the menu)

You could try to clear Metro cache. Please take a look to this gist.

Hope this helps.

Related