Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Error: Error watching file for changes: EMFILE" when launching tests with "npm test" #1073

Closed
juanmaguitar opened this issue Jun 15, 2018 · 3 comments

Comments

@juanmaguitar
Copy link
Contributor

juanmaguitar commented Jun 15, 2018

Issue description

  • components: all
  • reactstrap version 6.1.0
  • MacOs 10.13.3
  • Node: 8.11.1
  • NPM: 3.10.10

What is happening?

⬢  reactstrap  master ⦿ npm test

> reactstrap@6.1.0 test /PROJECTS/reactstrap
> cross-env BABEL_ENV=test react-scripts test --env=jsdom

2018-06-15 20:37 node[61784] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2018-06-15 20:37 node[61784] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2018-06-15 20:37 node[61784] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: Error watching file for changes: EMFILE
    at _errnoException (util.js:1022:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1359:9)

What should be happening?

It should launch the tests properly

Steps to reproduce issue

  1. clone the repo
  2. install the dependencies with npm install
  3. launch the tests with npm test

References

@juanmaguitar
Copy link
Contributor Author

juanmaguitar commented Jun 15, 2018

It seems to be something related to the version of watchman used by jest. As many people in this issue doing brew install watchman solved this for me.

I don't know if there's some more generic solution that should be adopted by reactstrap to prevent this error

@TheSharpieOne
Copy link
Member

You can run coverage to tell it not to watch and thus not to use watchman. This is what I have to do on some of the computers I use with less privileges.

@juanmaguitar
Copy link
Contributor Author

Oks, I close this issue then as there is no much else to be done here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants