What is the Difference between running react native code on Web Browser and Expo GO? - react-native

I am running React Native Code on the Web browser and in Expo Go. In the web browser, it runs fine without any error but in Expo Go, it is not importing even a single module and showing module not found error again and again on almost all modules even after reinstalling them and also reinstalling node_modules.
Can anyone tell what's the difference between running react-native code on Expo Go and Web Browser?
Also what is this issue and how to solve it?

Related

React native app to react native web problem (typescript, babel)

Hello so I'm working on an app for android and iOS which is quite developed by now and I'd like to activate react-native-web on it. the problem is that I have a bug when I try to run the script to launch the web development server :
The first error at the top is the one I'm struggling with I've tried updating my babel config :
I tried deleting the babel config at the root of my project and it changed nothing like the babel config has no importance
It is being used though to build the android app i know that, but for the react native web build it seems he has no importance
But is still get the same error again and again
please let me know if you need any more information's on this issue

local src file doesn't exist when trying to use expo go

So I'm new to React Native Expo and am trying to build a social app. Trying to test my app on my iPhone, I used my camera to scan the QR code provided by the Metro Bundler and tried to open my app on Expo Go. So I have different screens and a js file for each of the screens, and the bundler returns an error says the source code for the screens doesn't exist. It worked fine on a web browser on my computer. Any idea how to solve this? This might be a stupid question. Thanks a lot.
Here is a screenshot of the error:
error image

React-Navigation and installation error and first-usage

I am new to react-native or you can say new to React and I am working on react-native navigation I have installed all the required libraries as instructed in https://reactnavigation.org/docs/getting-started but when I am running my code it is giving an error as '#react-navigation/native could not be found within the project or in this directories.' What should I do is there any way to get started with my code? Help me
If you have installed your app following the react native cli guide you might want to try running
gradle clean
in your android folder und then try to run your app in the emulator again.
On my first steps with react native I stumpled upon the same issue. :-)

How to run a react native app (a bare workflow from expo or a regular one) in web (browser)?

I'm trying to run my React Native app as a web site, on a browser.
I tried to go according to https://necolas.github.io/react-native-web/docs/installation/ but the instructions on the Setup page are not clear.
I found some (rare) posts regarding this, but they are old (2019) and seem to deviate from the info in the link above.
I use yarn android to run it on android.
So, I tried using yarn web. Didn't work.
Also, tried the basic react-native start followed by react-native run-web.
It seems the run-web command is not what is needed.
Any assist appreciated.
P.S. I initialized my project through Expo, as a Bare Workflow project. Hope that helps
According to the docs:
Expo for web can work on any React Native project. When you initialize a new project with a bare workflow template using expo-cli, if you run yarn web or npm run web it will start up expo-cli and open your project in a web browser.
The same guides for web from the managed workflow apply here.
So basically just initialise your project using expo init project-name and then select bare workflow or managed workflow. After that you can execute npm run web. It will open up the browser and run the web version of it. Keep in mind that there are some incompatibility of libraries from expo, for example, the Webview is incompatible on the web so you need to switch when on web to an iframe or so.

React native fails to start watch mode or gets stuck while Building JavaScript bundle

I have been working with React native for a few days now. Everything seemed to be working fine until I installed Nativebase. Now either I would get this error:
OR it would get stuck at around 97% while Building JavaScript bundle after a couple of Project restarts and clearing cache. This happens regardless of whether I'm running on my phone or the emulator. I'm using the Expo XDE but its the same with the cmd.