Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throwing error when create a sample npm module under windows 7 starter OS #9

Open
byteshiva opened this issue Feb 26, 2015 · 4 comments

Comments

@byteshiva
Copy link

Generator Throwing error when creating a sample npm module under windows 7 starter OS

C:\github\sample\12\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 (C:\github\sample\12\node_modules\istanbul\
lib\hook.js:102: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 (C:\github\sample\12\node_modules\istanbul\lib\command\common\run-w
ith-cover.js:116:16)
    at C:\github\sample\12\node_modules\istanbul\lib\command\common\run-with-cov
er.js:241:17
    at C:\github\sample\12\node_modules\istanbul\lib\util\file-matcher.js:68:16
npm ERR! Test failed.  See above for more details.

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! teet@0.0.0 prepublish: `npm test && npm prune`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the teet@0.0.0 prepublish script 'npm test && npm prune'.
npm ERR! This is most likely a problem with the teet 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 teet
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\github\sample\12\npm-debug.log

npm-debug.log

12657 error Windows_NT 6.1.7601
12658 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\no
dejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
12659 error node v0.12.0
12660 error npm  v2.5.1
12661 error code ELIFECYCLE
12662 error [email protected] prepublish: `npm test && npm prune`
12662 error Exit status 1
12663 error Failed at the [email protected] prepublish script 'npm test && npm prune'.
12663 error This is most likely a problem with the teet package,
12663 error not with npm itself.
12663 error Tell the author that this fails on your system:
12663 error     npm test && npm prune
12663 error You can get their info via:
12663 error     npm owner ls teet
12663 error There is likely additional logging output above.
12664 verbose exit [ 1, true ]

@domharrington
Copy link
Owner

Thanks for the report. From your stack trace it looks as though it is an issue in istanbul. I'll investigate further

@domharrington
Copy link
Owner

As a workaround, you could try removing this line from the package.json

"test": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha test",

@byteshiva
Copy link
Author

Thee workaround worked, as a workaround I have renamed fieldname from test to __test

    "__test": "istanbul cover ./node_modules/.bin/_mocha test",

@domharrington
Copy link
Owner

Does this ever get run? Can it not be removed? I think it is related to this issue: gotwarlost/istanbul#13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants