istanbul icon indicating copy to clipboard operation
istanbul copied to clipboard

windows issues

Open ghost opened this issue 9 years ago • 7 comments

@gotwarlost Normal usage on Windows always throws this exceptions:

basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^
SyntaxError: missing ) after argument list
    at Object.exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:513:28)
    at Object.Module._extensions..js (module.js:550:10)
    at Object.Module._extensions.(anonymous function) [as .js] (C:\xxx\node_modules\istanbul\lib\hook.js:109:37)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Function.Module.runMain (module.js:575:10)

NPM Script

 istanbul cover --report json node_modules/.bin/_mocha -- -u exports -R spec test/index.js",

ghost avatar Jun 22 '16 02:06 ghost

the same question

Kingwl avatar Jul 21 '16 09:07 Kingwl

I'm using this command on Mac and Windows and it's working. Hope this helps.

./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha

ghost avatar Aug 21 '16 14:08 ghost

Give this a read, https://github.com/gotwarlost/istanbul/issues/677

It was my similar question that the answer fixed my problem.

ghost avatar Aug 21 '16 14:08 ghost

I have similar issues using

babel-node ./node_modules/.bin/babel-istanbul cover ./node_modules/mocha/bin/_mocha --require ./node_modules/dotenv/config -- --timeout 10000 --recursive app/tests

I tried with ./node_modules/.bin/babel-node but no luck.

Any help will be appreciated.

kalote avatar Oct 24 '16 07:10 kalote

I use this, works great.

./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --require --compilers js:babel-core/register./node_modules/dotenv/config -- --timeout 10000 --recursive app/tests

ghost avatar Oct 24 '16 11:10 ghost

@kalote add a space after --compilers js:babel-core/register

ghost avatar Oct 24 '16 11:10 ghost

I'm still getting the same issue please assist istanbul cover --report ./node_modules/.bin/_mocha -R spec

Aussie15 avatar Aug 31 '19 08:08 Aussie15