create-react-app: npm test and yarn test fail with no error message

Is this a bug report?

Yes.

Can you also reproduce the problem with npm4.x?

Yes, I tried this with 3.10.8, 4.6.1, and 5.2.0. I deleted the node_modules folder and ran npm cache clean with each version as well.

Environment

  1. node -v: v6.9.1
  2. npm -v: tested with 3.10.8, 4.6.1, and 5.2.0
  3. yarn --version (if you use Yarn): 0.27.5
  4. npm ls react-scripts (if you haven’t ejected):
client@0.1.0 H:\bitbucket\program\src\main\client
`-- react-scripts@1.0.7
  1. Operating system: Windows 7 Enterprise

Steps to Reproduce

The testing script will fail in both unejected app whose development is ongoing, and a newly created app even afer ejecting.

  1. create-react-app myapp and cd into the directory
  2. Without changing anything in the project, run npm test or yarn test

After Ejecting

  1. create-react-app myapp and cd into the directory
  2. Run npm run eject
  3. Run npm test or yarn test

Expected Behavior

I expect the Jest test runner to start and watch for file changes.

Actual Behavior

H:\bitbucket\program\src\main\client
λ npm test

> client@0.1.0 test H:\bitbucket\program\src\main\client
> react-scripts test --env=jsdom

npm ERR! Test failed.  See above for more details.

H:\bitbucket\program\src\main\client
λ yarn test
yarn test v0.27.5
$ react-scripts test --env=jsdom
error Command failed with exit code 3221226356.

An npm-debug.log file will sometimes be created but it is always empty.

Reproducible Demo

I cannot share a demo or the actual project unfortunately, but I suspect it is an issue with my environment. The start, run, and build scripts all work perfectly by the way.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 15 (5 by maintainers)

Most upvoted comments

I’m sorry I missing a step, the problem is material-design-icons. I’m remove all dependencies and add one by one, test fail after add material-design-icons, but I did not use it.