Hello everyone! I afraid I am asking an asked question, but previous post does not answer my question. I am trying to "npm test" on a fresh pull from mern.io github.

But this error prevent me from having a success build:

C:\Users\lordk.WebStorm2016.3\VirtualCinema\vc-mernstarter>npm test

mern-starter@2.0.0 test C:\Users\lordk.WebStorm2016.3\VirtualCinema\vc-mernstarter 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

C:\Users\lordk.WebStorm2016.3\VirtualCinema\vc-mernstarter\node_modules.bin\ava:2 basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')") ^^^^^^^ SyntaxError: missing ) after argument list at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:542:28) at Module.replacementCompile (C:\Users\lordk.WebStorm2016.3\VirtualCinema\vc-mernstarter\node_modules\nyc\node_modules\append-transform\index.js:58:13) at module.exports (C:\Users\lordk.WebStorm2016.3\VirtualCinema\vc-mernstarter\node_modules\nyc\node_modules\default-require-extensions\js.js:8:9) at Object.<anonymous> (C:\Users\lordk.WebStorm2016.3\VirtualCinema\vc-mernstarter\node_modules\nyc\node_modules\append-transform\index.js:62:4) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Function.Module.runMain (module.js:604:10) at Function.runMain (C:\Users\lordk.node-spawn-wrap-9672-a621197ad199\node:40:10) ----------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | ----------|----------|----------|----------|----------|----------------| ----------|----------|----------|----------|----------|----------------| All files | 100 | 100 | 100 | 100 | | ----------|----------|----------|----------|----------|----------------|

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

Could anyone help me out with this?

Write your answer…

Hello, you are running on Windows, so you may have to avoid harmony-proxies. In your package.json change in scripts / test : 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

with : cross-env NODE_ENV=test PORT=8080 MONGO_URL=mongodb://localhost:27017 node_modules/.bin/nyc node_modules/.bin/ava --serial

This fixed it for me. I'm running on a mac.

Reply to this…