Skip to content

Instantly share code, notes, and snippets.

@brennanMKE
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.

@combatpoodle
Copy link

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

@shirley-wang
Copy link

This is so helpful! Thanks!

@yanni4night
Copy link

Great!

@techlab23
Copy link

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

@RocKhalil
Copy link

I love you.

@SupriyaKalghatgi
Copy link

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

@mslipper
Copy link

mslipper commented Feb 4, 2017

Many thanks for this!

@reneviering
Copy link

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

@vijayTabtor
Copy link

thanks ....dude you are awesome

@hnq90
Copy link

hnq90 commented May 24, 2017

👍

@bustamantemsergio
Copy link

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

@babzcraig
Copy link

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

@dwelby101
Copy link

Thank you very much, this really helped! 👍

@KDamir
Copy link

KDamir commented Oct 17, 2017

Thx, it works!

@showarm
Copy link

showarm commented Oct 26, 2017

great

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