Comments (15)
Will check it on Monday.
from highcharts-react-native.
After some more troubleshooting and running rm -rf node_modules/*/.git
as suggested here I'm no longer having issues with react-native-push-notification
and I can install highcharts-react-native
however I still receive the following error in the react native packager when running react-native start --reset-cache
:
(node:7017) UnhandledPromiseRejectionWarning: Error: jest-haste-map: Haste module naming collision:
Duplicate module name: react-native
Paths: /Users/dev/Documents/Projects/my-project/client/node_modules/react-native/package.json collides with /Users/dev/Documents/Projects/my-project/client/node_modules/@highcharts/highcharts-react-native/node_modules/react-native/package.json
This error is caused by `hasteImpl` returning the same name for different files.
at setModule (/Users/dev/Documents/Projects/my-project/client/node_modules/jest-haste-map/build/index.js:569:17)
at workerReply (/Users/dev/Documents/Projects/my-project/client/node_modules/jest-haste-map/build/index.js:641:9)
at processTicksAndRejections (internal/process/next_tick.js:81:5)
from highcharts-react-native.
At this moment its experimental version of package and we are still developing package for npm and live demos.
from highcharts-react-native.
Hi @r-bman
Currently we released new stable varsion of highcharts-react-native. Could you confirm that the problem is resolved in your application with the current version?
from highcharts-react-native.
@sebastianbochan Thanks for the replies.
I'm now able to install the library successfully, however I run into the following errors in the iOS simulator:
[Error] Did not parse stylesheet at 'http://localhost:8081/assets/node_modules/@highcharts/highcharts-react-native/highcharts-layout/css/styles.css' because non CSS MIME types are not allowed when 'X-Content-Type: nosniff' is given.
[Error] Refused to execute http://localhost:8081/assets/node_modules/@highcharts/highcharts-react-native/highcharts-layout/js/message.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] Refused to execute http://localhost:8081/assets/node_modules/@highcharts/highcharts-react-native/highcharts-files/highcharts.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
When I've used iOS webviews in the past, I've had to copy local static files into the Resources
folder in Xcode. If you can find a way to overcome this, that would be great but I haven't found a way myself.
from highcharts-react-native.
@r-bman,
Do you use production mode or expo build:ios
? How you run your app, because Im not able to reproduce the issue, being honest.
from highcharts-react-native.
@sebastianbochan It's an ejected App and I'm running in debug mode. Perhaps it's an issue with my project configuration but I don't know what's causing it. I run the App by clicking the run button in XCode.
from highcharts-react-native.
@sebastianbochan I've managed to get the library working by adding the highcharts-layout & highcharts-files directories into the Copy Bundles Resources
section in Build Phases
within Xcode, and changing the webview source
prop to source={{ uri: 'highcharts-layout/index.html' }}
. I guess expo allows access to static files, whereas an ejected App does not. The only problem with this is that I've had to amend node_modules/highcharts-react-native/highcharts/src/HighchartsReactNative.js
locally so I'll probably fork the library to commit my changes.
from highcharts-react-native.
Hi @r-bman,
Thank you for your valuable feedback and help. Im just waiting for your final notes (if worked or not) and then I think will update docs (and test your soltuion with expo) to avoid confusions among other users.
from highcharts-react-native.
@sebastianbochan I can confirm that this library works with the method I outlined. Granted, it's not ideal having to copy the files within Xcode but I haven't found a better solution yet.
from highcharts-react-native.
Hi @r-bman,
Im still developing big update of the package, but would be really helpful if you could test using:
HighchartsReactNative
source={require(../highcharts-layout/index.html)}
In my scenario works properly, but the source: uri
seems to be broken in expo native apps and some xcode demos (domain problem -1100).
index.html
add script like
<script>
alert('wrapper')
</script>
from highcharts-react-native.
@sebastianbochan I'm having issues running my App after installing this library again due to the following error: Module @highcharts/HighchartsReactNative does not exist in the Haste module map
I don't see how your suggestion to use source={require(../highcharts-layout/index.html)}
is any different to how the library currently works (see HighchartsReactNative.js:12). Doing this just results in the errors described here.
In your Xcode tests, you must follow my instructions here. You will notice that after you add files from Copy Bundles Resources
it actually moves them into the root of the project so the files will need dragging down to the Resources
directory in Xcode. You must also re-run the project from Xcode whenever you add or change files in the Resources
directory in Xcode.
I can't comment on Expo because we don't use it but @Zuozhuo may be able to help.
from highcharts-react-native.
Thank you for the feedback.
Im considering to rebuild the wrapper and inject all files (css, html, js) inline in HTML string, instead of adding references. As a result we avoid these errors and problems with paths.
Tomorrow will do some tests.
from highcharts-react-native.
@r-bman,
Please let me know which version of xCode / os do you have.
I did steps:
- Clone repo of wrapper
- run
yarn
- run in expo, all works properly
- call
expo eject
to have correctios
andandroid
native apps - run the project (ios) in xCode and then in simulator
- As a result all worked properly (withtout errors which you experienced).
ps. Im in the process of creating docs about your case, but was not forced to do your steps to run the right demo. Did I miss something?
from highcharts-react-native.
Im closing it as duplicate of #4
Lets keep all inputs in one thread.
from highcharts-react-native.
Related Issues (20)
- 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
- no news on this package
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.