Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm test hangs for newly generated app

See original GitHub issue

Can you reproduce the problem with latest npm?



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.


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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

Timercommented, Nov 5, 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 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!

stephenceliscommented, Oct 26, 2016

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

`npm run test` hangs on brand new project - Ionic Forum
When I run npm run test on a brand new blank project, the app compiles, chrome opens, the tests run successfully, and then…...
Read more >
node.js - jest hangs indefinitely, runs no tests - Stack Overflow
On MacOS I fixed this by uninstalling and reinstalling watchman using brew uninstall watchman and then reinstalling with brew install watchman .
Read more >
Running and debugging Node.js | WebStorm Documentation
WebStorm helps you run and debug your Node.js applications. ... Select the newly created Node.js configuration from the Select run/debug ...
Read more >
Troubleshooting | Cypress Documentation
Cypress comes with an npm CLI module that parses the arguments, starts the Xvfb server (if necessary), and then opens Cypress. Some common...
Read more >
workerpool - npm
New tasks are put in a queue. A worker executes one task at a time, and once finished, picks a new task from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found