question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Expo and Web

See original GitHub issue

Area 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.

  1. 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 using yarn 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 say Camera module from PyTorch core, I get this error: Screenshot 2021-12-27 at 1 39 11 AM

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:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AyushExelcommented, Nov 23, 2022

@raedle thanks! I was probably doing yarn add. Your suggestion fixed the problem!

1reaction
raedlecommented, Dec 29, 2021

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 with yarn android works.

@byCedric, do you have an idea? 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Develop for Web - Expo Documentation
Learn how to develop your app for the web so you can build a universal app. ... You can try experimental Metro web...
Read more >
Multi-platform support using React Native - Expo - Medium
React Native for Web is a compatibility layer between React DOM and React Native. It can be used in new and existing apps,...
Read more >
Running react-native-web using expo - Codersera
Since expo SDK version 33, expo supports react-native-web. In this blog, we'll see how to set up your react-native-web project using expo.
Read more >
Does Expo Support React Native Web? - 2022 - InApps
A set of tools, libraries as well as services developers can use to build native iOS and Android apps faster than ever before...
Read more >
[SDK46][Web] ReactDOM.render is no longer supported in ...
[SDK46][Web] ReactDOM.render is no longer supported in React 18 #18485 ... expo-env-info 1.0.5 environment info: System: OS: macOS 11.6
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found