My Node Js starts and exit automatically when I compile React-native app - react-native

I have an issue that started to happen few days ago, when I create new project in react native and then trying to start it with "react-native run-android" it starts to compile then shows build successfull but my Node.js not opening it should be started but somehow it is not, how should I fix it ?
I dont see any errors as I mentioned above it shows build successful but node js server wont start

Related

Why does my Expo app run in Expo Go but not as a development build?

I've created a development build of an Expo app using EAS. Previously I would open the app in Expo Go by running npx expo start and scanning the Metro Bundler QR code.
Now, when I try to do the same thing, Expo Go asks whether I want to open the project in Expo Go or as a "Development Build". It works fine in Expo Go, but crashes immediately when I attempt to open the dev build. The error reads:
null is not an object (evaluating '_ReanimatedModule.default.createNode')
This error is suspiciously similar to one that I encountered earlier in development, which I resolved by downgrading to React Native version 0.69.6. I'm also encountering a second error that says "'main' has not been registered", but I suspect this is downstream of the first error.
I have the same issue when I try to run the app with npx expo start --dev-client.
Any ideas why I might be having this problem?
It sounds like you may have run expo prebuild (https://docs.expo.dev/workflow/prebuild/) which removes "main": "node_modules/expo/AppEntry.js", from app.json. Try to create a new expo app and look at it's app.json file.
When you run expo prebuild it changes a few things with your project (see "side effects" in the prebuild docs).
I'm actually working through some issues with that right now too. I thought I had to run prebuild but turns out I didn't have to. Ever since I ran it my app will not load via the dev-client way. I can however switch back to npx expo start (NOT npx expo start --dev-client, see the scripts section of app.json as that is also changed when prebuild is run).
Let me know if you are able to get your app to load after re-adding the main stuff to app.json.
Ps, are you by chance using react-native-google-mobile-ads?

React native (Expo) project shows "cant find variable : require"

I am an intermediate react developer.
I was running my react native app peacefully without any problems untill one morning, i did not change anything in my codebase but when i tried to run the app through expo client, it started showing the error in the screenshot.
I have checked and checked this platform, and not a single solution.
I am currently using expo sdk 43 (managed workflow) please help...this is my first time posting here.
This is the error below;
Can't find variable: require
http://127.0.0.1:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:5:24.globalcode#http://127.0.0.1:19000/node_modules /expo/AppEntry.bundle?platform=android&dev=true& hot=false&minify=false:720:3.
Click here for the screenshot of the error
I got it fixed.
See what i did,
I created a fresh expo project using "expo init"
Then copied all my files into the new project "except node_modules and .expo folders".
Then i ran "npm install"
Viola!!! Everything works fine now
Note: i tried removing "node_modules" before over and over again and it dint work.
The only thing that worked was starting a new project and following the above steps.

React-native no bundle URL present on getting started project

I am trying to run react-native on an Iphone simulator via "react-native run-ios" following the getting started guide (https://facebook.github.io/react-native/docs/getting-started.html)
on react-native's official website, everything seems fine and the new terminal pops up saying "loading dependency graph, done.". The app starts taking a long time to load then it says "No bundle URL present".
This is not unique for this getting started project. I have tried to clone other react native projects having the same result
What can cause this to fail on both the getting started projects as well as other projects?
I solved this issue by deleting the build:
1. YOUR_PROJECT/ios/build/,
then I ran the project again by changing the port:
2. react-native run-ios --port 8080

React Native FCM not working

I am using this package https://github.com/evollu/react-native-fcm
I complete the installation process. The project is working. But every time I turn it on project. I am working ./gradlew clean on console. Other than that, I get the following error when I run
You can delete build folder, and recompile project again.

React-Native packager stuck on `Requesting bundle`

I'm trying to run a boilerplate react-native app and the packager seems to stall out right at the beginning when the javascript bundle is requested. Eventually the iOS simulator gives up and throws Could not connect to development server.
Here is the terminal output:
[01/17/2017, 10:48:00] <START> Initializing Packager
[01/17/2017, 10:48:00] HMR Server listening on /hot
React packager ready.
[01/17/2017, 10:48:47] <START> Requesting bundle
bundle_url: /index.ios.bundle?platform=ios&dev=true&minify=false
I haven't been in react-native for a few months but I used to be able to specify whether the app should load from a bundle or just load the js directly. I would load directly when the xCode project was in debug mode or from a bundle when in release mode.
Again this is just straight boilderplate - no external packages or anything. Just using react-native init TestProj and then cd TestProj/ && react-native run-ios
I'm using the last version of react-native 0.40.0 and the expected react dependency of react#~15.4.0-rc.4.
Thanks for any help on this.
I'm not sure what the issue was but it was fixed after I restarted my computer. I also had issues getting the code to refresh once the app was loaded. That was fixed by uninstalling nodemon globally.