2

I did a clean install of Acquia Dev Desktop (Build Nov 13th, 2017) under Windows 10. I can clone my site (Drupal 8) and then click to open my local Drush console. It opens a DOS prompt into the docroot directory. When I execute any drush commands I get "The filename, directory name, or volume label syntax is incorrect."

Here is a sample:

C:\DevDesktop\website-dev\docroot>drush -d -d version

Loading drushrc "C:\Program Files (x86)\DevDesktop\tools\vendor\drush\drush\drushrc.php" into "drush" scope. [bootstrap]

[0.78 sec, 2.48 MB] Cache HIT cid: 8.1.15-commandfiles-0-61c5476a3a04a40d4bdadfd521f0641f [0.84 sec, 2.52 MB] [debug]

Begin redispatch via drush_invoke_process(). [1.16 sec, 6.43 MB] [notice]

Backend invoke: "C:\DevDesktop\website-dev\docroot\vendor\bin\drush.launcher" [command] --root="C:\DevDesktop\website-dev\docroot" --debug --verbose version 2>&1 [1.21 sec, 6.45 MB]

Calling proc_open("C:\DevDesktop\website-dev\docroot\vendor\bin\drush.launcher" --root="C:\DevDesktop\website-dev\docroot" --debug --verbose version 2>&1);

The filename, directory name, or volume label syntax is incorrect. End redispatch via drush_invoke_process(). [1.24 sec, 6.44 MB] [notice]

2
  • I would update DevDesktop to the latest version and try again first. There are couple drush updates.
    – cchen
    Commented Oct 19, 2018 at 4:00
  • The known issues (#1) says not to for windows docs.acquia.com/dev-desktop/known-issues. I tried anyway, didn't work and I rolled back to the Nov 2017 version.
    – genepool99
    Commented Oct 19, 2018 at 5:25

3 Answers 3

2

Acquia Dev Desktop (ADD) comes with Drush 8 included. When you call drush the version coming with ADD is started (as you can see from the "Loading drushrc" debug). That version of Drush is then detecting your site local version of Drush - the one located in the vendor directory of your Drupal installation. (Just look at the path from the "Backend invoke" debug.)

The problem is that drush.launcher doesn't work on Windows.

There are two options that probably solves the problem:

  1. Update your site local Drush to Drush 9 with Composer. This my recommended solution. (Drush 9 doesn't have drush.launcher)
  2. If you don't want to use Drush 9, just delete the site local Drush with Composer.

PS! This problem is not related to the known Windows issue with ADD.

1
  • #1 - upgrading to Drush 9 doesn't resolve the issue. The same issue persists. As suggested on github drush issue page "cd into vendor/bin" in order to invoke composer drush. Otherwise remove composer Drush package and use Acquia DD Drush.
    – Laziz
    Commented Dec 8, 2020 at 22:32
3

I was also facing the same issue on windows 10 with Acquia Dev Desktop and configured existing Drupal 8 project from a client.

Following three things what I did worked for me.

I simply:

  1. Removed directory vendor/drush
  2. Removed directory vendor/bin
  3. Removed line "drush/drush": "^8.1" from composer.json which is located on docroot directory.

Now, default drush is working for me as you can see the default drush version at C:\Program Files (x86)\DevDesktop\tools\composer.json.

Hopefully, this will help someone else.

0
1

In my case installing drush through composer is what caused the error for me. I also had issues removing it with composer, so in order to get it working I manually removed the following:

/vendor/drush/
/vendor/bin/drush

After that it worked fine for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.