Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SaeedPrez's avatar

Laravel Dusk problem..

Hi guys,

So I just installed a new Laravel 5.4 project and thought I'd give Laravel Dusk a try..

Followed the installation steps in the documentation:

  1. Ran composer require laravel/dusk
  2. Updated AppServiceProvider.php
  3. Ran php artisan dusk:install

But when I run php artisan dusk I get the following output:

dir=$(d=${0%[/\\]*}; cd "$d"; cd "../phpunit/phpunit" && pwd)

# See if we are running in Cygwin by checking for cygpath program
if command -v 'cygpath' >/dev/null 2>&1; then
        # Cygwin paths start with /cygdrive/ which will break windows PHP,
        # so we need to translate the dir path to windows format. However
        # we could be using cygwin PHP which does not require this, so we
        # test if the path to PHP starts with /cygdrive/ rather than /usr/bin
        if [[ $(which php) == /cygdrive/* ]]; then
                dir=$(cygpath -m "$dir");
        fi
fi

dir=$(echo $dir | sed 's/ /\ /g')
"${dir}/phpunit" "$@"

Anyone know how to fix this? I'm running Homestead on Windows 10.

0 likes
9 replies
Jaytee's avatar
Jaytee
Best Answer
Level 39

Yo yo,

Haven't used dusk yet and i don't use windows unfortunately but there is a PR for support for Windows 10 which looks like it's adding a DuskCommand.

Have a look and see if it fixes your problem

https://github.com/laravel/dusk/pull/13

1 like
SaeedPrez's avatar

Hey @Jaytee,

Thanks for your reply. That didn't help fix the Homestead problem, but now it works from Windows command prompt, which is 10x better because I can now run the tests directly from Sublime Text ☺☺☺

1 like
SaeedPrez's avatar

Update

Running php artisan dusk on Windows was giving me this error:

  [Symfony\Component\Process\Exception\RuntimeException]
  TTY mode is not supported on Windows platform.

But after adding the changes suggested by @Jaytee (in this pull request), I was getting a different error:

Error: Call to undefined function Facebook\WebDriver\Remote\curl_init()

..which was pretty easy to fix, I simply un-commented the following line:

;extension=php_curl.dll

..in my php.ini file and now it's working on Windows 10.

SaeedPrez's avatar

At the end of the day, I think it's simply too early for me to upgrade my project to Laravel 5.4. Spent half the day already trying to get things running and ran into problem after problem so I'm going to stick with Laravel 5.3 for now.

3 likes
Jaytee's avatar

Yeah i tried updating my project that's in development from 5.3 to 5.4 and ran into more issues than expected. The one thing i was desperately after was the fluent routing as that always seems to be an OCD problem for me in terms of how they are presented in my routes file (don't judge haha).

Since i've got the time on my hands, I've started a 5.4 project and am porting my 5.3 project over which isn't necessary but it is for me since i wanted the fluent routing.

On the plus side, L-Mix is significantly faster for sure. The one thing i just don't like about it is the way it presents itself haha but that's not too much of a problem.

1 like
SaeedPrez's avatar

I can understand that, we all have our ways ☺

I'm starting to think Laravel is becoming more and more of an iOS-developer's-PHP-framework.

1 like
Jaytee's avatar

Yeah I'm sick of looking at it to be honest but then again, i'm sick of coding in general. I find that i'm taking more regular breaks than i used to. It's the same with gaming, i use to do that a lot and now my equipment just sits there.

I'll give you one better, i'm sick of technology haha and yet here i am today, about to re-enrol for a web developer diploma because there's literally nothing else that interests me.

I've been here since Laravel 5, i think i'll be gone by Laravel 6 if i dont get my act into gear lol.

SaeedPrez's avatar

Have to be careful not to get burned out. Back in 2009-2010 I had a well paying job with computers, was studying computers and playing computer games on my free time. I got so sick of it, I thought I'd do anything non-computer..

I ended up dropping everything computer and started restaurants, which I knew nothing about, and today after a few hard but very educational years, I'm a restaurateur trying to be a developer again. Unlike before though, the paste is extremely fast these days, you barely get to learn something before the next new thing is out

1 like
mnabialek's avatar

I've solved the problem with running

php artisan dusk

in Linux (I personally use Docker not Homestead at the moment) in this PR https://github.com/laravel/dusk/pull/70 but as it's not released yet you should use dev-master branch to get the changes

1 like

Please or to participate in this conversation.