The system cannot find the path specified. Windows Error
See original GitHub issueThe 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" %* )
Issue Analytics
- State:
 - Created 9 years ago
 - Comments:18 (5 by maintainers)
 
Top Results From Across the Web
11 Ways to Fix "The System Cannot Find The Path Specified ...
11 Ways to Fix "The System Cannot Find The Path Specified" Error on Windows · 1. Run Command Prompt as an Administrator ·...
Read more >Windows 10 error "The system cannot find the path specified"
Right-click (or press and hold) the Start button, and then select Control Panel. · Search Control Panel for Recovery. · Select Recovery >...
Read more >How to Fix "The system cannot find the path specified." Error in ...
The solution of "The system cannot find the path specified." Error. Now that you know the cause of this error is invalid directories...
Read more >8 Useful Ways to Fix "The System Cannot Find the Path ...
The System Cannot Find the Path Specified; Fix 1. Run an Anti-Virus Scan; Fix 2. Verify Path; Fix 3. Recover Folders or Files;...
Read more >What is the reason for the error message "System cannot find ...
Open the Registry Editor (press windows key, type regedit and hit Enter ) . · Navigate to HKEY_CURRENT_USER\Software\Microsoft\Command Processor\ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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.
I think you’re talking about something else. nightmarejs has 15,605 stars as of writing this, released 3.0.1 on March, and is maintained not by a person but a company, Segment.io, which has raised 109million in funding.
I really like headless chrome myself too, and I recommended mocha-chrome for
mocha-phantomjsusers. I have also used SauceLabs before when I needed real browsers with good success.