Closed epfromer closed 4 years ago
Apologies, I didn't see the new instructions to add the .hcscript into the asset extensions section of metro.config.js. I did that, and the app launches, but on iOS I just get blank screen with the basic example.
Are you able to share your app ? Do you use ejected expo or native expo?
Sure, it's here: https://github.com/epfromer/foo
Native expo I believe (I haven't ejected it).
Hi @epfromer, Thank you for demo, I will debug it and get back to you, tomorrow.
Hi @epfromer,
I debugged your code and it looks like the alignItems: 'center'
style breaks the View
.
Just confirmed you are right - not sure why. Anyway, thanks for the help.
Hi @epfromer how were you able to add the hcscript file?
You should add / edit your metro file.
Please check our docs here: https://github.com/highcharts/highcharts-react-native#installing
I have a monorepo with Yarn Workspaces, which also requires editing the metro config file. I added the hscript asset this way:
const { createMetroConfiguration } = require('expo-yarn-workspaces')
const config = createMetroConfiguration(__dirname)
config.resolver.assetExts = [...config.resolver.assetExts, 'hcscript']
module.exports = config
That's my metro config file, i added it just like the docs recommend but still getting this error
What kind of error ? About missing .hcscript
? Do you have metro-config package?
Even after using metro config file code I get
Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
I am following the blog post at https://www.highcharts.com/blog/post/creating-mobile-charts-with-highcharts-react-native/ but am getting the following error when I connect with Expo:
Failed building JavaScript bundle. Unable to resolve "../highcharts-files/highcharts.hcscript" from "node_modules\@highcharts\highcharts-react-native\src\HighchartsModules.js"
My dependencies are: