Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error expo without expo and no charts #91

Open
angeliqueIcono opened this issue Aug 6, 2020 · 29 comments
Open

Error expo without expo and no charts #91

angeliqueIcono opened this issue Aug 6, 2020 · 29 comments
Labels
enhancement New feature or request

Comments

@angeliqueIcono
Copy link

I try to use this wrapper without expo and I have a warning : "Error: The method or property expo-file-system.downloadAsync is not available on ios, are you sure you've linked all the native dependencies properly?"
And there is no charts displayed, I don't know if it's linked... Can I use this wrapper without expo?

@Denyllon
Copy link
Contributor

Denyllon commented Aug 7, 2020

Hi @angeliqueIcono ,

Thank you for your report.
Could you tell me which version of the wrapper are you running?

Kind regards!

@angeliqueIcono
Copy link
Author

I have the latest version : 3.0.1

@sebastianbochan
Copy link
Contributor

sebastianbochan commented Aug 10, 2020

Thank you for details, thankfully we found a reason of problem (old packages in the package.json). The new release will be available tomorrow.

I apologize for inconvenience.

@horstleung
Copy link
Contributor

@sebastianbochan I think a package.json update is not enough for this case. For my own upgrading, this error comes from a bare rn project. We need to install react-native-unimodules which requires manual project setting updating.

Can I use this package without expo?

@sebastianbochan
Copy link
Contributor

sebastianbochan commented Aug 11, 2020

Im still testing the package.json and app. I will let you know, as soon as possible, about results.

@sebastianbochan
Copy link
Contributor

sebastianbochan commented Aug 13, 2020

We were able to reproduce the problem in the native React Native.

"Error: The method or property expo-file-system.downloadAsync is not available on ios, are you sure you've linked all the native dependencies properly?"

Just working on solution of the problem.

@Denyllon
Copy link
Contributor

Hi @angeliqueIcono , @fattomhk

We've just released the new version of the package. Would you be able to check whether the problem still exists?

Kind regards!

@angeliqueIcono
Copy link
Author

Yes I can check asap when you release the package!

@Denyllon
Copy link
Contributor

@angeliqueIcono

Actually, it's already available on NPM, so you can simply install it.

@angeliqueIcono
Copy link
Author

angeliqueIcono commented Aug 18, 2020

Yes I installed it and I have the version 3.1.1 but I still have the warning and no chart displayed...
Capture d’écran 2020-08-18 à 14 54 32

@Denyllon
Copy link
Contributor

@angeliqueIcono ,

I generated the new application project using create-react-native-app, installed the react-native-webview, and @highcharts/highcharts-react-native packages, added that configuration into metro.config.js, and the chart appeared on ios and android without any errors.

It's a bit hard to guess what is happening there, so could you provide us with a minimized application where the problem is noticeable? Would be very convenient to get some repository and steps to recreate the issue.

Kind regards!

@angeliqueIcono
Copy link
Author

angeliqueIcono commented Aug 18, 2020

You can't create the project with create-react-native-app, it's creating the project with expo, you need to create it with npx react-native init AwesomeProject. And if so you have the error.
https://reactnative.dev/docs/environment-setup on the "React Native CLI Quickstart" tab
image

@sebastianbochan
Copy link
Contributor

Which version of EXPO CLI do you have?

Could you paste your package.json?

Have you tried to use expo init instead of react-native init ?

@angeliqueIcono
Copy link
Author

angeliqueIcono commented Aug 19, 2020

I don't want to use expo in my project... And you tell this in your doc : "You can either install this wrapper within app based on Expo tools, or bare React Native app."

@angeliqueIcono
Copy link
Author

You can try with this repo : https://github.com/angeliqueIcono/test-react-native-highcharts

@Denyllon
Copy link
Contributor

@angeliqueIcono ,

Thank you for explanation. It definitely does the job here.
I've tested the wrapper with app generated by npx react-native init [app_name], and you're right, the problem still exists.
Happily, we do know how to resolve it.

Here are the steps I did when creating the app, in order to make it work correctly:

  • run npx react-native init myApp
  • edited the metro.config.js file, in the way mentioned above (https://github.com/highcharts/highcharts-react-native#installing)
  • installed react-native-webview library
  • installed react-native-unimodules package
  • edit two files from ios directory, as it is described here, and for android files here
  • run npx pod-install from the root directory of the app.

After doing above steps, the app should work well.
I've also added those info into the documentation and will release the new version, only to let the other users know how to correctly configure bare react native app, in order to make it run.

Please follow the steps described above and let us know about the result.
It will be very valuable to us.

Kind regards!

@angeliqueIcono
Copy link
Author

Yes it's working! Thanks a lot!

Kind regards!

@iuricernov
Copy link

I'm still having this error even updating to the latest version 😞
By the way, the project I'm working on is not using expo

image

@Denyllon
Copy link
Contributor

Hi @iuricernov ,

Are you sure that you've followed all the steps from the #91 (comment)? It looks like the react-native-unimodules is not configured in a correct way.
Are you able to provide us with the minimal reproduced package which shows the problem?

Kind regards!

@iuricernov
Copy link

@Denyllon I'm not using expo, and unimodules looks like an expo lib. Is that really correct?
Anyway I'll give it a try today at night

@Denyllon
Copy link
Contributor

Denyllon commented Aug 31, 2020

As it is written in our documentation, you do not need to install a whole Expo library, but the react-native-unimodules (which are a group of foundational Expo tools) are required to make this package work correctly, and it should be installed within your bare React Native project.
Please install the package, configure the files as here, and here, then let us know if something will go wrong.

@horstleung
Copy link
Contributor

@Denyllon
Is there any chance for working without unimodules? or excluding unnecessary tools?

The unimodules are containing lots of unnecessary tools for bare react-native project.

image

Seems that this project is using Asset and FileSystem only.

@Denyllon
Copy link
Contributor

Denyllon commented Sep 1, 2020

@fattomhk For now, the project imports only the mentioned Asset, and FileSystem modules, so these two modules are required. We have not tried to use only the unimodules-file-system-interface and expo-asset packages, because unfortunately, we do not know too much about dependencies between packages inside the react-native-unimodules though, and their documentation recommends to use a whole package, so it's a bit much safer to use a whole package.

@horstleung
Copy link
Contributor

@Denyllon I found that the package is providing a way to exclude packages.

https://docs.expo.io/bare/installing-unimodules/

image

Could you provide a list in readme for that?

@Denyllon
Copy link
Contributor

Denyllon commented Sep 2, 2020

@fattomhk You're right. Thank you for the valuable remark. We'll test it, and add the info about that fact into our documentation soon. I pin the enhancement label here.

@Denyllon Denyllon reopened this Sep 2, 2020
@Denyllon Denyllon added enhancement New feature or request and removed pending reply labels Sep 2, 2020
@mahipatsinghtellius
Copy link

@Denyllon I am still facing this issue after trying the updated steps shared for React CLI. Also, there was no issue with unimodules lib installation but some warning messages.Can you please check?

image

image

@Denyllon
Copy link
Contributor

Denyllon commented Dec 1, 2020

@mahipatsinghtellius Could you provide me with the link to the minimal project (GitHub repository recommended), where the problem is noticeable during building the app? That would be the easiest way to find out what is happening there.

@hungdev
Copy link
Contributor

hungdev commented Jan 8, 2021

@Denyllon I love you ❤️, I hope you keep continuing maintenance this project.

And here is an example for anyone who needs it: https://github.com/hungdev/react-native-scatter-3d-example

@amirbhz86
Copy link

Thanks @hungdev your example helped me to fix my problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants