-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
NodeJS doesn't rebuild with new insert #18
Comments
You might need to recompile the android app |
Gradle |
Is there a react-native command for that? How does that work? |
react-native run-android |
I run it every time right after running |
|
Took me a while to find out I had to Finally did, ran it successfully, but still get the first response written in the express server. Still seems the NodeJS apps aren't being rebuilt, despite running the whole thing every time:
|
Try one more thing: delete |
Added Emulating on a MotoG3-TE - 6.0. |
Oh emulators? I don't think this library works there, because node.js is compiled for ARM architectures, and emulators usually are not ARM. |
Oh sorry, bad use of the word. I'm running the app on the actual phone (I was emulating using Geny Motion, but I read in #5 that emulators don't work). Is there any thing else we can try? |
Well, there is nothing else to try if you: (1) remove and rebuild rnnodebundle, (2) rebuild with gradle from scratch, (3) uninstall and reinstall the mobile app. Are you sure you have done those 3? There is no way the previous rnnodebundle can creep in after that |
Got it fixed by using method (3), uninstalling the app on the device. Seems like the device caches the NodeJS application for some reason. Manually going to Is there no programmatic way to to this? Thanks for the help. |
I added I'll close this for now, thanks a lot for the help. Cheers! |
Yeah, we have to rebuild after changes. Recompiling is a normal thing to do when developing mobile apps with Java and Gradle. React Native is what brings something completely new: runtime reloading. It would be a lot more work for me to build runtime reloading of the background process, so we do it the normal way: rebuilding |
I think the uninstall was important because react-native-node unzips the rnnodebundle in an application directory, and only once (this is to avoid unzipping every time). So I think another way of solving the problem would be rebuild (after a gradle clean), clear the app's cache and data, then run |
I'm running a simple express server like the example, and it works. But after changing the nodejs server and rebuilding with
cd server && npm i && cd .. && react-native-node insert ./server
the changes don't take effect any more.I've tried deleting
node_modules
on both the nodejs and the react-native apps, tried deleting thernbundle
that gets saved to theraw
folder. Nothing changes the express app once it's been built for the first time.The text was updated successfully, but these errors were encountered: