Mac OS test watcher failing
See original GitHub issueIs this a bug report?
I believe this is a bug. I’m just not sure who’s?
Did you try recovering your dependencies?
I have tried this by using only npm.
Which terms did you search for in User Guide?
Error watching file for changes: EMFILE
Environment
node -v
: 8.10.0 and 9.9.0npm -v
: 5.7.1yarn --version
(if you use Yarn):npm ls react-scripts
(if you haven’t ejected):
Then, specify:
- Operating system: Mac OS High Siera
- Browser and version (if relevant):
Steps to Reproduce
https://github.com/mnemanja/failing-tests-repo
- Clone repo
- Install
- Run tests
From the list of 3 (currently found) problematic dependencies removing one makes the tests watcher work properly:
- node-sass-chokidar: 1.2.2
- material-ui: 0.20.0
- enzyme: 3.3.0
Expected Behavior
Tests should be successfully executed and the watch mode should be active.
Actual Behavior
The watch mode exists and error messages are shown.
Reproducible Demo
https://github.com/mnemanja/failing-tests-repo
I have also created similar reports on all involved repos: https://github.com/michaelwayman/node-sass-chokidar/issues/50 https://github.com/airbnb/enzyme/issues/1593 https://github.com/mui-org/material-ui/issues/10801
I have tried installing the Watchman via brew, as per many suggestions found in this repo and several others, but after the installation, nothing has changed.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
This problem was solved in more recent Jest versions, which you can use through our 2.x alpha. Instructions: https://github.com/facebook/create-react-app/issues/3815
Unfortunately there’s no fix coming for the 1.x branch of
react-scripts
. So your best bet is to either start using 2.x alphas (warning: they’re somewhat unstable) or to keep trying different workarounds in the threads you linked to.@mnemanja
brew install watchman
solve my problem, but before I had the same Issue."test": "react-scripts test --env=jsdom
I, also, have this line Maybe, you should removenode_modules
yarn.lock
package.json.lock
(if present) And startyarn
to recreate dependency?