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.

macOS Sierra (10.12) unable to run tests

See original GitHub issue

After upgrading to sierra I’ve got the following error being thrown each time I run npm test

Determining test suites to run...

2016-10-30 15:28 node[763] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-10-30 15:28 node[763] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2016-10-30 15:28 node[763] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: Error watching file for changes: EMFILE
    at exports._errnoException (util.js:1026:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1406:11)
npm ERR! Test failed.  See above for more details.

So far unable to find any fixes, anyone?

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected): react-scripts@0.6.1
  2. node -v: v6.9.1
  3. npm -v: 3.10.8

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
gaearoncommented, Oct 30, 2016

It would be great if you could spend some time debugging what happens without watchman. Many people had and keep having this issue but nobody helped investigate it so far.

3reactions
bondarewiczcommented, Oct 30, 2016

@fson thanks for the tip, unfortunately this does not solve the issue… I found the following link however following also doesn’t fix it 😦

# 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

EDIT: just found that installing watchman fixes an issue, from https://github.com/facebook/jest/issues/1767

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to set up on Mac Sierra 10.12 - Appium Discuss
I'm able to run automated tests with iPhone simulator, on Mac Sierra 10.12.6 with ... I have latest version of Xcode 9, Mac...
Read more >
Can't update to Sierra 10.12.3 - Apple Community
I have a mid 2011 MacBook Air (11") and I am running Sierra 10.12.1. It seems I can't update to 10.12.3 and any...
Read more >
Troubleshooting macOS Sierra Problems - OSXDaily
Try rebooting and holding down Command+R and choosing “reinstall Mac OS X” but you might need to use internet restore (Command + Option...
Read more >
macOS Sierra Problems - MacPorts Trac
MacPorts must be re-installed in a version configured for macOS 10.12 Sierra. Ensure you have Xcode 8.0 or greater installed and selected ...
Read more >
787341 - [Missing Test]: Chrome on MacOS Sierra ... - Monorail
Issue 787341: [Missing Test]: Chrome on MacOS Sierra (10.12.1) and early-2011 Macbook Pro fails to render pages after GPU switches to Discrete ...
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