Strider-CD / strider-build-badge

Build badges for Strider
4 stars 6 forks source link

npm scripts causes installation failures on Windows #3

Closed oliversalzburg closed 9 years ago

oliversalzburg commented 9 years ago

One use case where this is an issue is when you use the dev.sh script from the main strider repo. That script will invoke npm install for this project, which causes npm test, which causes istanbul to run, which is not set up properly to run on Windows.

This causes failures all the way back to the top of the stack.

/d/strider-build-badge /d/strider
-
> strider-build-badge@0.1.0 prepublish d:\strider-build-badge
> npm test && npm prune

> strider-build-badge@0.1.0 pretest d:\strider-build-badge
> npm run-script lint

> strider-build-badge@0.1.0 lint d:\strider-build-badge
> jshint .

> strider-build-badge@0.1.0 test d:\strider-build-badge
> istanbul cover ./node_modules/.bin/_mocha -- -R spec

No coverage information was collected, exit without writing coverage information
d:\strider-build-badge\node_modules\.bin\_mocha:2
basedir=`dirname "$0"`
        ^
SyntaxError: Unexpected token ILLEGAL
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Module._extensions..js (module.js:478:10)
    at Object.Module._extensions..js (d:\strider-build-badge\node_modules\istanbul\lib\hook.js:101:13)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at runFn (d:\strider-build-badge\node_modules\istanbul\lib\command\common\run-with-cover.js:86:16)
    at d:\strider-build-badge\node_modules\istanbul\lib\command\common\run-with-cover.js:189:17
    at d:\strider-build-badge\node_modules\istanbul\lib\util\file-matcher.js:52:16
npm ERR! Test failed.  See above for more details.

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Users\\OliverSalzburg.HARTWIG\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "i"
npm ERR! node v0.12.3
npm ERR! npm  v2.9.1
npm ERR! code ELIFECYCLE
npm ERR! strider-build-badge@0.1.0 prepublish: `npm test && npm prune`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the strider-build-badge@0.1.0 prepublish script 'npm test && npm prune'.
npm ERR! This is most likely a problem with the strider-build-badge package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm test && npm prune
npm ERR! You can get their info via:
npm ERR!     npm owner ls strider-build-badge
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     d:\strider-build-badge\npm-debug.log
jaredly commented 9 years ago

yeah, we can probably just drop the make test line from the package.json

oliversalzburg commented 9 years ago

Awesome :+1: