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

Can't run stryker #149

Closed
shinglyu opened this issue Sep 10, 2016 · 7 comments
Closed

Can't run stryker #149

shinglyu opened this issue Sep 10, 2016 · 7 comments

Comments

@shinglyu
Copy link

Hi, I've been trying to run following the quickstart guide (vanilla NPM - mocha - mocha - clear-text), but I got this error:

[shinglyu@shinglyu-XPS-15-9550:~/workspace/mutation-testing-demo/stryker]
% npm run stryker                                                

> @ stryker /home/shinglyu/workspace/mutation-testing-demo/stryker
> stryker -c strker.conf.js

/usr/bin/env: ‘node\r’: No such file or directory

npm ERR! Linux 4.4.0-36-generic
npm ERR! argv "/home/shinglyu/.nvm/versions/node/v6.3.0/bin/node" "/home/shinglyu/.nvm/versions/node/v6.3.0/bin/npm" "run" "stryker"
npm ERR! node v6.3.0
npm ERR! npm  v3.10.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ stryker: `stryker -c strker.conf.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the @ stryker script 'stryker -c strker.conf.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     stryker -c strker.conf.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/shinglyu/workspace/mutation-testing-demo/stryker/npm-debug.log

My mocha is OK:

[shinglyu@shinglyu-XPS-15-9550:~/workspace/mutation-testing-demo/stryker]
% ./node_modules/mocha/bin/mocha                                         127 ↵


  Calculator
    ✓ substractPositive
    ✓ add


  2 passing (6ms)

And I'm using nvm:

[shinglyu@shinglyu-XPS-15-9550:~/workspace/mutation-testing-demo/stryker]
% npm -v
3.10.3
[shinglyu@shinglyu-XPS-15-9550:~/workspace/mutation-testing-demo/stryker]
% node -v
v6.3.0
[shinglyu@shinglyu-XPS-15-9550:~/workspace/mutation-testing-demo/stryker]
% /usr/bin/env node -v
v6.3.0

This was how I installed stryker:

npm i --save-dev mocha@^2.3.3
npm i --save-dev mocha stryker stryker-api stryker-mocha-runner
@nicojs
Copy link
Member

nicojs commented Sep 10, 2016

Hi @shinglyu thanks for reporting this issue.

Could you confirm that the name of the stryker config file is correct? strker.conf.js seems like the wrong name, did you indeed name the config file like that?

If that is the problem, stryker should do a better job of error reporting.

@shinglyu
Copy link
Author

I'm about to board a long distance flight, I'll reply later

Nico Jansen notifications@github.com 於 2016年9月10日 週六 22:28 寫道:

Hi @shinglyu https://github.com/shinglyu thanks for reporting this
issue.

Could you confirm that the name of the stryker config file is correct?
strker.conf.js seems like the wrong name, did you indeed name the config
file like that?

If that is the problem, stryker should do a better job of error reporting.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#149 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADGbJ5r5a7ZjgRXAu2PcHVTZ1N7SqyI3ks5qor6jgaJpZM4J5udr
.

@nicojs
Copy link
Member

nicojs commented Sep 12, 2016

@shinglyu did you manage to get it working?

@shinglyu
Copy link
Author

@nicojs : I fixed the typo, but there is still one problem: The node_modules/stryker/bin/stryker file has DOS line endings. I manually change the line ending to UNIX using vim's set ff=unix and fixed the problem. You might need to double check the line ending in the released package, probably some problem with git's auto-conversion feature.

@nicojs
Copy link
Member

nicojs commented Sep 22, 2016

Thanks for the heads up! I created PR #152 to fix this issue. Everything else working as it should?

@shinglyu
Copy link
Author

It runs smoothly after fixing the line endings. Thanks for fixing it!

@nicojs
Copy link
Member

nicojs commented Oct 6, 2016

Error message is sufficiently clear after all:

[2016-10-06 17:54:09.276] [FATAL] ConfigReader - File stryker.consf.js does not exist!

closing this issue

@nicojs nicojs closed this as completed Oct 6, 2016
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