How to fix "Error watch ENOSPC" of React Native in Arch Linux
I’ve been recently discovering some issues with React Native development on Arch Linux and I want to share with you the way I fixed it.
This time something was wrong every time I started the React Native server with
react-native start and I realised that it was related to the watch of the server so, here is the solution.
By the way, the following steps can also be used in other distributions based on Debian or RedHat.
- Run the following command in your terminal (this is the global command for Debian/RedHat/Arch)
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- Add this line
fs.inotify.max_user_watches=524288 to the file /etc/sysctl.d/99-sysctl.conf
- Finally execute the following command to make it permanent