hechoendrupal / drupal-console

The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.
http://drupalconsole.com
GNU General Public License v2.0
938 stars 557 forks source link

[console] Can't run Drupal Console PHAR file #4260

Open anavarre opened 4 years ago

anavarre commented 4 years ago

Problem/Motivation

$ drupal
/usr/local/bin/drupal: line 2: syntax error near unexpected token `<'
/usr/local/bin/drupal: line 2: `<html><head>'

Version 1.9.4 already installed

$ drupal --version
Drupal Console Launcher 1.9.4
$ drupal

 [ERROR] Drupal Console is not installed at: "                                                                          
         /home/test/drupal"                                                                                             

 You must execute the following composer commands:

 composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader           

New install in a different location (assuming 1.9.5?) and run the executable:

$ /home/test/drupal 
/home/test/drupal: line 2: syntax error near unexpected token `<'
/home/test/drupal: line 2: `<html><head>'

How to reproduce

Follow the installation steps at https://drupalconsole.com/docs/en/getting/launcher

I wonder if this is related to https://github.com/hechoendrupal/drupal-console-launcher/releases/tag/1.9.4 being the latest version and not 1.9.5?

AndrewMac commented 4 years ago

Just wanted to add that I just got the same error after a fresh install of Console into an existing Drupal 9 project. I'm pretty sure I followed all the instructions properly.

Thanks in advance for any help or advice you may be able to give with this.

justrussian commented 4 years ago

4262 This is a related issue.