question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The system cannot find the path specified. Windows Error

See original GitHub issue

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" %*
)

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nathanboktaecommented, May 18, 2018

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.

0reactions
nathanboktaecommented, May 30, 2018

I’ve already used nightmare api and encountered few issues. The repo owner is no more interested to maintain it any more.

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-phantomjs users. I have also used SauceLabs before when I needed real browsers with good success.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found