This was based on content found at https://programsareproofs.com/articles/react_native_nix.html. It was a great starting point, but didn't work for me. I run PopOS with Nix managed by home-manager. Sometimes, things that work great out of the box for NixOS users don't always work for me, but this is what did. (I'm not sure if the original author uses NixOS)
I am using devenv as well.
I needed to bump the inotify values on my machine to make watchman run without bailing with an error immediately.
# appease watchman
# info from https://www.suse.com/support/kb/doc/?id=000020048
sudo sysctl fs.inotify.max_user_instances=8192
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p
I also needed to "cold boot" the emulator after creating it by running create-avd
once I started a devenv shell
session.
That means I needed to start the emulator and let it boot up to the phone's dashboard before I started the app
with npm run start-android
.
I was able to init a new project with npx [email protected] init AwesomeProject --version 0.72.3 --npm
. Specifically,
I needed the version and npm
source override for .... reasons.
I then start react native with npm start