unable to test (win 10)
See original GitHub issueCreated a fresh new app and was unable to run “npm test” (Windows 10)
mern init newAPP
cd newApp
npm install
it looks like it tries to run a linux script in (\node_modules.bin\acorn)
the error:
D:\development\newAPP>npm test
> mern-starter@2.0.0 test D:\development\newAPP
> cross-env NODE_ENV=test PORT=8080 MONGO_URL=mongodb://localhost:27017/mern-test node_modules/.bin/nyc node --harmony-proxies node_modules/.bin/ava
D:\development\newAPP\node_modules\.bin\ava:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Module.replacementCompile (D:\development\newAPP\node_modules\nyc\node_modules\append-transform\index.js:58:13)
at module.exports (D:\development\newAPP\node_modules\nyc\node_modules\default-require-extensions\js.js:8:9)
at Object.<anonymous> (D:\development\newAPP\node_modules\nyc\node_modules\append-transform\index.js:62:4)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at Function.runMain (C:\Users\ozkey\.node-spawn-wrap-3376-b97e9a32b699\node:40:10)
at Object.<anonymous> (D:\development\newAPP\node_modules\nyc\bin\wrap.js:19:4)
----------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
----------|----------|----------|----------|----------|----------------|
All files | 100 | 100 | 100 | 100 | |
----------|----------|----------|----------|----------|----------------|
npm ERR! Test failed. See above for more details.
D:\development\newAPP>
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11
Top Results From Across the Web
Easy to Fix “Failed to play test tone” Error
Easy to Fix “Failed to play test tone” Error · Solution 1: Restart Windows Audio Service · Solution 2: Change the Audio Service...
Read more >Failed to Play Test Tone: How to Fix This Audio Error
1. Update the drivers; 1.1 Update drivers manually · 2. Install the High Definition Audio Device driver · 3. Restart the Windows Audio...
Read more >[SOLVED] Failed to Play Test Tone Error - TechCult
[SOLVED] Failed to Play Test Tone Error · Method 1: Restart Windows Audio Service · Method 2: Run System File Checker (SFC) and...
Read more >How To Fix “Failed to play test tone” Error on Windows 10
Fix “Failed to play test tone” Error on Windows 10 · Solution 1: Restart Windows Audio Related Services · Solution 2: Run Audio...
Read more >Persistent Failed to play Test Tone Error - Microsoft Community
i didn't get an answer . Click on Start Menu, and then go to Settings > Update & Security > Windows Update and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

To fix this, I removed the
npm --harmony-proxiesportion from the “test” command in package.json, and added a--serialflag to the end.package.json:
I’m not sure what the purpose is of
npm --harmony-proxiesin this command; can the maintainer explain it? This--serialseems to be required when performing the testing upon git commit.At any rate, in Windows this is the reason for the errors:
npmis processing theava(bash) script as Javascript. Hencedirnameis undefined. Thenode_modules/.binfolder actually has two scripts,avawhich is bash andava.cmdwhich is a DOS batch file; so it isnode_modules/.bin/ava.cmdthat gets called on Windows using the above configuration.@ozkey: Can you reopen this issue?