简体   繁体   中英

ReferenceError: Can't find variable: modules

I am trying to implement highcharts wrapper within react-native application following this

https://www.highcharts.com/blog/post/creating-mobile-charts-with-highcharts-react-native/

On running the app with expo start on device, it returned me below error

Warning: %s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI., RootErrorBoundary ReferenceError: Can't find variable: modules * App.js:21:8 in render

Line 21 of App.js have the highcharts container HighchartsReactNative

Any leads will be highly helpful

You should declare modules as array.

const modules = [
    'highcharts-more',
    'solid-gauge'
];

You can find more info in our docs (Readme.md) here: - https://github.com/highcharts/highcharts-react-native

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM