Skip to content

Instantly share code, notes, and snippets.

Created October 4, 2016 16:10
Show Gist options
  • Save brennanMKE/f6aa55b452ecda2f4c7a379e21647c88 to your computer and use it in GitHub Desktop.
Save brennanMKE/f6aa55b452ecda2f4c7a379e21647c88 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.

Copy link

Sweet! This helped get me about half way there. Thanks!

Copy link

This is so helpful! Thanks!

Copy link


Copy link

I scratched my head for few hours with this issue. Thanks Brennan!! Your snippets just saved the day.

Copy link

I love you.

Copy link

~/AwesomeProject/node_modules/react-native/packager ~
It stops here

Copy link

mslipper commented Feb 4, 2017

Many thanks for this!

Copy link

Thanks for this great info. It saved my day :)

Copy link

thanks ....dude you are awesome

Copy link

hnq90 commented May 24, 2017


Copy link

Thanks. My system starts to throw a npm error overnight, and this solved it!

Copy link

It solved the issue. New Mac and upgraded to Sierra. This solved the issue perfectly. Thanks!

Copy link

Thank you very much, this really helped! 👍

Copy link

KDamir commented Oct 17, 2017

Thx, it works!

Copy link

showarm commented Oct 26, 2017


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