question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Packager fails on macOS 10.12 Sierra

See original GitHub issue

I have upgraded to the macOS Sierra beta yesterday, and the React Native Packager seems to fail. I’ve tried to reinstall the dependencies, but no use.

The output of the packager is this:

[11:45:02 AM] <START> Building Dependency Graph
[11:45:02 AM] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot

React packager ready.

2016-08-09 11:45 node[6397] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-08-09 11:45 node[6397] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-08-09 11:45 node[6397] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
 ERROR  watch null EMFILE
{"code":"EMFILE","errno":"EMFILE","syscall":"watch null","filename":null}
Error: watch null EMFILE
    at exports._errnoException (util.js:873:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1217:21)

The only reference to that specific error I have found is this old issue on the Node 0.10 repo’s. I have tried the ‘fix’ in that topic, namely increasing the open file references limit. That didn’t work.

The issue occurs on both Node 4.4.7 and 6.3.1, on macOS Sierra 10.12 on a MBP 2015 15". Does anyone know what is going on here?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:48
  • Comments:38 (1 by maintainers)

github_iconTop GitHub Comments

184reactions
mc13ancommented, Aug 10, 2016

Credit to @passwd for figuring this out

We were able to get it to work by increasing the max file limit and moving to watchman v4.6.0

here are the steps we followed:

1. increase max file limt

# check open file limit
sysctl kern.maxfiles

# edit sysctl
sudo vim /etc/sysctl.conf

# add these two lines
kern.maxfiles=10485760
kern.maxfilesperproc=1048576

# reboot
sudo reboot

# check new file limit
sysctl kern.maxfiles

2. upgrade to watchman 4.6

# clone repo
git clone https://github.com/facebook/watchman.git

# change to master branch
git checkout -b v4.6.0 v4.6.0

# run compiler
./autogen.sh
./configure --enable-lenient --without-pcre --with-python
make
sudo make install

# check watchman version
watchman -v

# result should be 4.6.0
28reactions
hghinagliacommented, Sep 22, 2016

FINALLY!!!

I ran the watchman watch-list command, then the error suggested me to run chmod 0700 /usr/local/var/run/watchman/<USER>-state as @oscart said, then it worked!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install odbc fails on macOS Sierra(Version 10.12.6)
I'm having an issue install the odbc package on macOS Sierra(Version 10.12.6). I have ...
Read more >
Third-party installer packages may not be ... - Der Flounder
With the release of macOS 10.12.4, it appears that Apple has made a change to the OS installer that blocks the installation of...
Read more >
macOS installer fails with “No packages were eligible for install”
No packages were eligible for install. Contact the software manufacturer for assistance. Quit the installer to restart your computer and try ...
Read more >
How to Fix the "macOS Could Not Be Installed on Your ...
Seeing the "macOS could not be installed on your computer" error when you try to update? Here's how to fix this macOS error....
Read more >
Fix macOS High Sierra Update Failure/Stuck/Installation Error
Reboot Mac and retry downloading a new macOS Sierra update 10.13/10.13.4. Click Apple Menu > Select App Store > Click Update next to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found