Skip to content

Instantly share code, notes, and snippets.

@zhoule
Forked from brennanMKE/README.md
Created March 13, 2017 05:26
Show Gist options
  • Save zhoule/ec0371c1fa32f78409f63eb748cb10bb to your computer and use it in GitHub Desktop.
Save zhoule/ec0371c1fa32f78409f63eb748cb10bb to your computer and use it in GitHub Desktop.
React Native on macOS Sierra

React Native Trouble

Updating to macOS Sierra is causing trouble with React Native due to some of the Node.js and system utilities it uses. Specifically the watch utility fails due to a limit on the number of files which can be opened at a time.

The following command shows the current limit.

launchctl limit maxfiles

It may show 256 as the lower limit. The following command will change the limits.

sudo launchctl limit maxfiles 2048 unlimited

Next you also want to uninstall react-native and reinstall it so you get a version which works better with Sierra. You also want to update Homebrew and install the current version of watchman.

npm uninstall -g react-native-cli
npm install -g react-native-cli
brew update
brew install watchman

Now try building and running your React Native project on macOS Sierra.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment