Skip to content

Instantly share code, notes, and snippets.

@joancaron
Forked from brennanMKE/README.md
Created September 30, 2017 15:19
Show Gist options
  • Save joancaron/9b7c1e0448bb05f9eff42ebd92e5866e to your computer and use it in GitHub Desktop.
Save joancaron/9b7c1e0448bb05f9eff42ebd92e5866e 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