Skip to content
  • Sponsor facebook/create-react-app

  • Notifications You must be signed in to change notification settings
  • Fork 27k
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

Add note for using CHOKIDAR_USEPOLLING in virtual machines to enable HMR #1608

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add note for using CHOKIDAR_USEPOLLING in virtual machines to enable HMR
AJamesPhillips committed Feb 21, 2017
commit 52c0cc2323476b4b632a1341b08760008b050ca5
1 change: 1 addition & 0 deletions packages/react-scripts/template/README.md
Original file line number Diff line number Diff line change
@@ -1452,6 +1452,7 @@ If this doesn’t happen, try one of the following workarounds:
* Some editors like Vim and IntelliJ have a “safe write” feature that currently breaks the watcher. You will need to disable it. Follow the instructions in [“Working with editors supporting safe write”](https://webpack.github.io/docs/webpack-dev-server.html#working-with-editors-ides-supporting-safe-write).
* If your project path contains parentheses, try moving the project to a path without them. This is caused by a [Webpack watcher bug](https://github.com/webpack/watchpack/issues/42).
* On Linux and macOS, you might need to [tweak system settings](https://webpack.github.io/docs/troubleshooting.html#not-enough-watchers) to allow more watchers.
* Inside virtual machines such as (a Vagrant provisioned) VirtualBox, [use `CHOKIDAR_USEPOLLING=true npm start`](https://github.com/facebookincubator/create-react-app/issues/1049#issuecomment-261731734).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this problem occur on Windows? If it can, we should recommend running npm i --save-dev cross-env and then replacing npm start with cross-env CHOKIDAR_USEPOLLING=true npm start.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the problem will occur on Windows. I'm happy to add this advice if you think we should but perhaps we can wait until someone reports a problem on Windows (whilst attempting to use CHOKIDAR_USEPOLLING=true npm start) ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not wait until somebody complains, better be safe than sorry. It is very frustrating for Windows users when docs assume they don't exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't mean it that way. Just meant that I'd prefer not to document a solution to a problem that might not exist (as it would clutter the docs with irrelevant info). But it sounds like you're pretty sure it is a problem. Have added the line to the docs. :)


If none of these solutions help please leave a comment [in this thread](https://github.com/facebookincubator/create-react-app/issues/659).