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

npm run test fails on Windows 7 due to FSEvent watcher #7099

Closed
sandra-arato opened this issue May 23, 2019 · 3 comments
Closed

npm run test fails on Windows 7 due to FSEvent watcher #7099

sandra-arato opened this issue May 23, 2019 · 3 comments

Comments

@sandra-arato
Copy link

Is this a bug report?

Bug. This might be a duplicate of #6261

Did you try recovering your dependencies?

Yes. I also tried 3 different ways of installs and restarted the machine in between.
I tried installing with yarn, npm, and npm i --no-optional
Each of them on fresh projects, not the same.

npm version: 6.9.0.
yarn version: 1.12.3.

Which terms did you search for in User Guide?

testing, setup, run test, fsevent, watchman

Environment

The npx create-react-app --info command doesn't work for me, so here's all the details of the environment:
OS: Windows 7 Enterprise 64bit - Service Pack 1
npm version: 6.9.0.
yarn version: 1.12.3.
create-react-app: 3.0.1.

Steps to Reproduce

  1. Follow the getting started guide, and set up a new project on a Windows 7 Enterprise 64bit machine.
  2. After installation, verify that you can run npm run start. App should start as expected.
  3. Try running npm run test
  4. Observe output in command prompt.

Expected Behavior

Jest test runs for App.js

Actual Behavior

Test is failing due to FSEvent error, see below:

Error: UNKNOWN: unknown error, watch at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:123:28)
image

Reproducible Demo

This is literally the fresh project from the create-react-app getting started guide, no addons, no specific setups. Version 3.0.1, Installed last week, been on this issue for the last few days,

@sandra-arato
Copy link
Author

I found a similar Stack overflow issue that made me wonder, and tried to run the same app on a 'desktop' Windows rather than the VM I'm on currently. It works on a Windows 10 desktop, so I think the issue has to do with the fact that it's running Windows on a VMware Horizon Client.

After that, I did try to run the tests in CI mode, with no watcher with the following command:

set CI=true&&npm test -- --coverage --no-watchman

Which could start jest, but now it can't find any files. I tried to move around the test file to see if it's changing the outcome, no luck so far.
image

@sandra-arato
Copy link
Author

As I know that it's a very small group of users stuck on this issue, I'll probably close this issue, and just leave a few references for future generations.

So, after more hours of debugging and googling, I found some related Jest issues that confirmed that I really have to tweak the solution to my own environment.
The path I chose was to create a fork of the react-scripts library, and implement my changes on top of that. If you are interested, this is the ndia-react-scripts library. Diffs are in my repo under create-react-app.
I still haven't debugged all my issues, once I do, I'll pop some kind of victory gif in to the readme.

@sandra-arato
Copy link
Author

Closing this as I don't think I'll get any feedback or a PR ready for merging.

@lock lock bot locked and limited conversation to collaborators May 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant