mocha-casperjs: The system cannot find the path specified. Windows Error
The system cannot find the path specified.
Getting this error on Windows(8x64) when running mocha-casperjs.cmd
I notice that mocha-casperjs.cmd
is looking for /bin/sh.exe
@IF EXIST "%~dp0\/bin/sh.exe" ( "%~dp0\/bin/sh.exe" "%~dp0\node_modules\mocha-casperjs\bin\mocha-casperjs" %* ) ELSE ( /bin/sh "%~dp0\node_modules\mocha-casperjs\bin\mocha-casperjs" %* )
I don’t know enough batch but my sh.exe
is
And even on replacing the path to above manually it gives this error
mocha-casperjs cygwin warning: MS-DOS style path detected: C:\...\node_modules\mocha-casperjs\bin\mocha-casperjs Preferred POSIX equivalent is: /cygdrive/c/Users/x/AppData/Roaming/npm/node_modules/mocha-casperjs/bin/mocha-casperjs CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames C:\...\node_modules\mocha-casperjs\bin\mocha-casperjs: line 3: dirname: command not found C:\...\node_modules\mocha-casperjs\bin\mocha-casperjs: line 4: readlink: command not found C:\...\node_modules\mocha-casperjs\bin\mocha-casperjs: line 9: /../../casperjs/bin/casperjs: No such file or directory
The mocha.cmd
just looks for node.exe
@IF EXIST "%~dp0\node.exe" ( "%~dp0\node.exe" "%~dp0\node_modules\mocha\bin\mocha" %* ) ELSE ( node "%~dp0\node_modules\mocha\bin\mocha" %* )
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 18 (5 by maintainers)
I highly recommend moving on to nightmarejs now. See the depreciation notice I posted. Otherwise there’s instructions for windows users in the readme and help here.