Closed mbhar6 closed 8 years ago
Also found the issue causing this...
In your bin/mocha-casperjs you have put '#!/bin/sh' instead of '#!/usr/bin/env node'. That is why your 'mocha-casperjs.cmd' is different from other modules, hence not working on windows. Please resolve. Also, I have to explicitly mention the path of phantomjs in my PATH variable, instead of this it should be picked from node modules only.
In your bin/mocha-casperjs you have put '#!/bin/sh' instead of '#!/usr/bin/env node'.
What? It is a shell script not node code. That makes no sense.
That is why your 'mocha-casperjs.cmd' is different from other modules
That's not my file. It's created by npm. Use mocha-casperjs.bat
. it calls casperjs.exe
which is a .net executable. Why Casper needs that, I do t know, it all results in a phantomjs process execution with arguments.
Have you ever tried running your code on windows. Have it ever run ????
Yes. I used it at Microsoft previously. But you responded without reading my last comment at all, let alone trying the instructions.
The code here runs in phantomjs.exe with casperjs. that plus NPM and setting up your path there are lots of things outside this project's responsibility that can go wrong on Windows. If you want to have simplicity and productivity you should use Mac or Linux like the rest of us developers.
Also see #25, and https://github.com/nathanboktae/mocha-casperjs#windows-users.
@nathanboktae Thanks for clarifying this. I've been battling this for days! I use mac+linux at home but I have to use windows at work.
Hi couldn't open the last issue again. Once you do 'npm install -g mocha-casperjs' and install all the dependencies. It says path not found error.
But if i go in my global node-modules and see the 'mocha-casperjs.cmd' it reads : @IF EXIST "%~dp0\/bin/sh.exe" ( "%~dp0\/bin/sh.exe" "%~dp0\node_modules\mocha-casperjs\bin\mocha-casperjs" % ) ELSE ( @SETLOCAL @SET PATHEXT=%PATHEXT:;.JS;=;% /bin/sh "%~dp0\node_modules\mocha-casperjs\bin\mocha-casperjs" % )
And if we remove "/bin/sh" it starts working on windows .......... Please have a look and fix