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 test hangs for newly generated app #960

Closed
stephencelis opened this issue Oct 25, 2016 · 12 comments
Closed

npm test hangs for newly generated app #960

stephencelis opened this issue Oct 25, 2016 · 12 comments

Comments

@stephencelis
Copy link

Can you reproduce the problem with latest npm?

Yes.

Description

A newly generated app hangs indefinitely on npm test.

Expected behavior

The App.test.js file test should run.

Actual behavior

The test process hangs.

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected):
    playground@0.1.0 /Users/stephen/Developer/playground └── react-scripts@0.7.0
  2. node -v:
    v6.9.1
  3. npm -v:
    3.10.9

Then, specify:

  1. Operating system: macOS Sierra 10.12.1 (16B2555)
  2. Browser and version: n/a

Reproducible Demo

If need be I can attach a demo, though I assume I would need to recursively remove the .gitignores and commit the modules?

Steps to reproduce for me every time:

create-react-app playground
cd playground
npm test
@gaearon
Copy link
Contributor

gaearon commented Oct 26, 2016

Sorry you're having issues.
Do any suggestions in jestjs/jest#1767 help?

@stephencelis
Copy link
Author

brew uninstall watchman did the trick. Should I file a bug there?

@gaearon
Copy link
Contributor

gaearon commented Oct 26, 2016

I reopened jestjs/jest#1767.

@Timer
Copy link
Contributor

Timer commented Nov 4, 2016

Just chiming in for anyone running into this problem, I ran into this same issue. Uninstalling watchman fixed the problem, though installing watchman again reintroduced the problem. The underlying problem (for me atleast) is detailed in facebook/watchman#358 and is related to corrupted state.

tl;dr try running launchctl unload ~/Library/LaunchAgents/com.github.facebook.watchman.plist, which should hopefully fix running tests (npm test) with watchman installed!

@felquis
Copy link

felquis commented Nov 13, 2016

Getting the same error, uninstalling then installing watchman with brew fixed the problem here.

@alphashuro
Copy link

launchctl unload ~/Library/LaunchAgents/com.github.facebook.watchman.plist fixed the problem for me

@invalidred
Copy link

Hi guys I am experiencing this issue as well. Can i get some help on how to resolve this on windows 10?

@gaearon
Copy link
Contributor

gaearon commented Feb 27, 2017

Can you please file a new issue with a reproducing example? I don’t think the known issues were reproducible on Windows, so this might be a different problem.

@thisconnect
Copy link

thisconnect commented May 27, 2017

Does create-react-app on OSX expect to have watchman installed? Should brew install watchman be documented as requirement in the readme.md?

@gaearon
Copy link
Contributor

gaearon commented Jun 22, 2017

This is going to be fixed with amasad/sane#97.

@gaearon gaearon added this to the 1.0.x milestone Jun 22, 2017
@Timer
Copy link
Contributor

Timer commented Aug 2, 2017

Closing in favor of #2639.

@shaunlebron
Copy link

For anyone having this problem on macOS, this is a workaround that allows you to run the tests once without the broken watcher:

CI=true npm test
or
CI=true yarn test

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

No branches or pull requests

8 participants