Support for Expo and Web
See original GitHub issueArea Select
react-native-pytorch-core (core package)
Description
First of all, I want to say that this is one of the best projects I’ve come across during the holidays. This exactly fits my use case of rapid ML application prototyping. can’t wait for the stable release! 😃
Unfortunately, I’m running a mac m1 so I faced some complications in the automated cli setup. I tried to hack together a solution with expo cli and it worked for Android, although now I can’t remember what I did exactly 😦 This brings me to my questions/ feature requests.
- Will the expo cli be officially supported? It’ll probably ease the setup process.
I don’t remember how, but I was able to get it working in expo cli by installing it via
expo install react-native-pytorch-core
and ran the app usingyarn android
and it worked! I did some troubleshooting by googling the errors but I don’t remember it now. Currently, when I try to build the app after importing and using sayCamera
module from PyTorch core, I get this error:
Earlier I was able to solve it. I know that expo isn’t officially supported so this isn’t really a bug but It’d be great if it could be supported.
2. Will the pytorch react native core components work with Web?
When I was able to run the camera module on the android emulator successfully, I tried to bundle the app for web. But I was getting errors like "export 'requireNativeComponent' was not found in 'react-native-web/dist/index'
and the app didn’t load on web. So, I was wondering if this library is only meant for mobile app development or is it intended to be the pytorch port for react-native that supports all platforms.
TLDR: Can I use react-native-pytorch-core
components on web and mobile alike?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:9 (5 by maintainers)
@raedle thanks! I was probably doing
yarn add
. Your suggestion fixed the problem!Thanks, @AyushExel! I could confirm the “Invariant Violation” error on my end with the
blank
Expo template.FWIW, ejecting the Expo app (
expo eject
) and running the React Native app withyarn android
works.@byCedric, do you have an idea? 😃