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
node -v
:v6.9.1
npm -v
: tested with3.10.8
,4.6.1
, and5.2.0
yarn --version
(if you use Yarn): 0.27.5npm ls react-scripts
(if you haven’t ejected):
client@0.1.0 H:\bitbucket\program\src\main\client
`-- react-scripts@1.0.7
- 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.
create-react-app myapp
andcd
into the directory- Without changing anything in the project, run
npm test
oryarn test
After Ejecting
create-react-app myapp
andcd
into the directory- Run
npm run eject
- Run
npm test
oryarn 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)
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 addmaterial-design-icons
, but I did not use it.