Comments (15)
Hi @axelav,
Have you tried to run npm i react-native-webview
and then npm i @highcharts/highcharts-react-native
?
from highcharts-react-native.
I solved this issue by clearing the cache and re-install react-native-webview. The steps shown as below:
- reset cache
- npm install react-native-webview --save
- edit compileSdkVersion in build.gradle to 29 and buildToolsVersion to "29.0.3"
- cd android && gradlew clean && gradlew build
- run with react-native run-android
from highcharts-react-native.
@AbdulWahab0707 see my comments above about editing the file Webview.ios.js
- it gets cached and you need to manually change it to get things working.
from highcharts-react-native.
Hi @axelav,
Have you tried to runnpm i react-native-webview
and thennpm i @highcharts/highcharts-react-native
?
yes, I have and receive a different error:
Error: 'node_modules/@highcharts/highcharts-react-native/highcharts-files/highcharts.js' cannot be loaded as its extension is not registered in assetExts
from highcharts-react-native.
Unfortunatley I was not able to reproduce the problem. Could you describe step by step what you did and attach your OS details?
from highcharts-react-native.
sure, here is info on my OS & node installation:
macOS Catalina 10.15.2
node v12.15.0
npm 6.13.7
and here are steps I followed to create my project:
expo init highcharts-example --npm
cd highcharts-example
npm i @highcharts/highcharts-react-native
# copy basic usage example https://github.com/highcharts/highcharts-react-native#highcharts-chart
# from docs into Chart.js
npm start
the package.json
is in my initial comment & the repo I created (it was breaking in a larger app I build, so I created this repo to test) is here: https://github.com/axelav/expo-highcharts
from highcharts-react-native.
The application still works for me.
Probably it can be related with missing metro.config.js
. Have you tried to add it ? https://stackoverflow.com/questions/53314515/loading-asset-with-custom-extension-not-working
Also you can try to put files into assets
https://github.com/highcharts/highcharts-react-native#files-are-not-loaded
from highcharts-react-native.
thanks for your reply @sebastianbochan. so you are able to get the example repo I created to work? I have tried it on at least three different machines and receive the same error on every one.
I'm unclear which custom extension I would need to add for this library? it seems to only import *.js
files. am I missing something there?
I don't think the suggestion to put files into assets is relevant as those directories do not exist in an expo project.
from highcharts-react-native.
I spent some time playing around with different versions of Expo and this module. When I create an Expo app using v33 of the Expo SDK, everything works fine. Any version higher than that (v34-36) of Expo, does not work and produces the error mentioned above.
From the Expo release notes:
- Expo v34 updated
react-native-webview
from5.8.0
to5.12.0
- Expo v35 updated
react-native-webview
from5.12.0
to7.0.5
If I npm i [email protected]
in an Expo app running SDK v34, the app works. Doing this while running SDK v35 or greater does not work. The changes between v5 and v7 of react-native-webview
seem be breaking.
From what I can tell, this module currently only works out of the box with Expo SDK v33 or lesser, though it will work with v34 with a bit of massaging. v35 and v36 do not appear to be compatible at this time.
from highcharts-react-native.
sorry for all the replies today, this was driving me crazy today and I needed to figure it out. turns out all that stuff about expo versions above was maybe not correct? I stumbled upon an issue in the react-native-webview
repo and believe I found a "solution", even though it still seems like a bit of a magic trick.
react-native-webview/react-native-webview#875 (comment)
This appears to be the weirdest caching issue I've seen in a long time.
Starting from release 7.0.1
RNCWKWebView
was renamed toRNCWebView
on iOS. So far, so clear: the build system is still looking for the old name and isn't finding it - it's probably cached somewhere.Eventually I dug into
node_modules/react-native-webview/lib/
just to be absolutely sure thatWebview.ios.js
definitely doesn't have an old reference toRNCWKWebView
- all looked fine, so I added a few debug print statements, at which point the build immediately started working. Then I removed the statements again (putting the file back how it was originally) and it still worked fine.All I can think is that saving the file forced a reload on whatever was watching the file and cleared out the copy of the old version. I don't know how or where that old version was stored, or why it wasn't cleared when every piece of transient data I could think of was wiped, but at least the build is working again now!
I tried doing that same thing, dropped a debugger
into Webview.ios.js
, restarted my app...and everything worked. So there is some sort of insane caching going on but I can't explain it.
Anyway, I'm just putting this here in case someone else runs into this issue. Hopefully it can save them hours of stress and confusion.
from highcharts-react-native.
@axelav I really appreciate your help in the debugging.
I will add the information to our FAQ section in readme on Monday.
from highcharts-react-native.
@sebastianbochan I'm happy to have figured out the issue and to help with the debugging. sounds good on adding to FAQ. Thanks for your hard work on this library, and I appreciate you taking the time to assist me here.
from highcharts-react-native.
Im just waiting for feedback from two other users who experienced the same issue.
from highcharts-react-native.
I am stuck in the same issue
from highcharts-react-native.
Thanks, this worked for me.
We faced this issue while we upgraded the targetsdk and compilesdk to API33, then we had to update the react-native-webview version too and this error occured.
just adding debugger once in Webview.android.js worked.
from highcharts-react-native.
Related Issues (20)
- showing rangeSelector options HOT 1
- Chart is not rendering in Android with hermes enable in react native. HOT 1
- Unable to update series data. HOT 3
- HighChart- When I use useUTC: false then x axis data are not showing properly HOT 6
- onLoad callback function prop HOT 1
- Chart does not render on Samsung Galaxy S20 Ultimate LTE (Android 11)
- App is crashing when chart goes out of screen doing scroll. HOT 6
- ios - non-expo - Failed to fetch script or layout - hcsript count not be read HOT 7
- Boost Module Usage
- On IOS I can only render series with 110670 data points HOT 2
- How do I define custom gauges? HOT 4
- Customize chart loader HOT 3
- App is crashing when chart goes out of screen doing scroll in Android 10. HOT 5
- Library is being used and our app is live HOT 8
- Chart is not rendering after generating apk file and installed on mobile HOT 12
- Can it rotate 3d scatter chart? HOT 1
- Is there anyway to use this library in a project which is initialized by Expo & using Typescript template? HOT 5
- `plotOptions.series.point.events` (event) param doesn't work in production
- The styledMode tru gives only black and dark mode not working HOT 2
- Not able to access the variable inside the formatter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from highcharts-react-native.