Skip to content

Commit 72fae09

Browse files
dmralexdriaguine
authored andcommitted
Add a note for OSX users about watchman and jest (facebook#1080)
* Add a note for OSX users about watchman and jest Minor additional information on how to solve watchman problems reported in facebook#713 and facebook#1767 * Introduced new Troubleshooting section Add better explanation how to solve facebook#713 and linked related Issues. * Tweak wording and add it to TOC
1 parent f021d7b commit 72fae09

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

packages/react-scripts/template/README.md

+27
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ You can find the most recent version of this guide [here](https://github.com/fac
5353
- [Now](#now)
5454
- [S3 and CloudFront](#s3-and-cloudfront)
5555
- [Surge](#surge)
56+
- [Troubleshooting](#troubleshooting)
5657
- [Something Missing?](#something-missing)
5758

5859
## Updating to New Releases
@@ -1069,6 +1070,32 @@ Install the Surge CLI if you haven't already by running `npm install -g surge`.
10691070
10701071
Note that in order to support routers that use HTML5 `pushState` API, you may want to rename the `index.html` in your build folder to `200.html` before deploying to Surge. This [ensures that every URL falls back to that file](https://surge.sh/help/adding-a-200-page-for-client-side-routing).
10711072
1073+
## Troubleshooting
1074+
1075+
### `npm test` hangs on macOS Sierra
1076+
1077+
If you run `npm test` and the console gets stuck after printing `react-scripts test --env=jsdom` to the console there might be a problem with your [Watchman](https://facebook.github.io/watchman/) installation as described in [facebookincubator/create-react-app#713](https://github.com/facebookincubator/create-react-app/issues/713).
1078+
1079+
We recommend deleting `node_modules` in your project and running `npm install` (or `yarn` if you use it) first. If it doesn't help, you can try one of the numerous workarounds mentioned in these issues:
1080+
1081+
* [facebook/jest#1767](https://github.com/facebook/jest/issues/1767)
1082+
* [facebook/watchman#358](https://github.com/facebook/watchman/issues/358)
1083+
* [ember-cli/ember-cli#6259](https://github.com/ember-cli/ember-cli/issues/6259)
1084+
1085+
It is reported that installing Watchman 4.7.0 or newer fixes the issue. If you use [Homebrew](http://brew.sh/), you can run these commands to update it:
1086+
1087+
```
1088+
watchman shutdown-server
1089+
brew update
1090+
brew reinstall watchman
1091+
```
1092+
1093+
You can find [other installation methods](https://facebook.github.io/watchman/docs/install.html#build-install) on the Watchman documentation page.
1094+
1095+
If this still doesn't help, try running `launchctl unload -F ~/Library/LaunchAgents/com.github.facebook.watchman.plist`.
1096+
1097+
There are also reports that *uninstalling* Watchman fixes the issue. So if nothing else helps, remove it from your system and try again.
1098+
10721099
## Something Missing?
10731100
10741101
If you have ideas for more “How To” recipes that should be on this page, [let us know](https://github.com/facebookincubator/create-react-app/issues) or [contribute some!](https://github.com/facebookincubator/create-react-app/edit/master/packages/react-scripts/template/README.md)

0 commit comments

Comments
 (0)