webksde / ddev-vscode-devcontainer-drupal-template

Drupal DDEV based development container with attached Visual Studio Code
23 stars 3 forks source link

Error: unknown command "drowl-init" for "ddev" #76

Closed JPustkuchen closed 2 years ago

JPustkuchen commented 2 years ago

Took the steps from: https://github.com/webksde/ddev-vscode-devcontainer-drupal9-template#how-to-use

changed into the directory with the .ddev folder, tried to run ddev drowl-init or ddev drowl-init-from-existing

but both are unknown and return:

Error: unknown command "drowl-init" for "ddev"

running ddev also doesn't thow the drowl-init or drowl-init-from-existing commant.

Usage: ddev [command]

Available Commands: auth A collection of authentication commands composer Executes a composer command within the web container config Create or modify a ddev project configuration in the current directory debug A collection of debugging commands delete Remove all project information (including database) for an existing project describe Get a detailed description of a running ddev project. exec Execute a shell command in the container for a service. Uses the web service by default. export-db Dump a database to a file or to stdout help Help about any command hostname Manage your hostfile entries. import-db Import a sql file into the project. import-files Pull the uploaded files directory of an existing project to the default public upload directory of your project. list List projects logs Get the logs from your running services. mutagen Commands for mutagen status and sync, etc. pause uses 'docker stop' to pause/stop the containers belonging to a project. poweroff Completely stop all projects and containers restart Restart a project or several projects. share Share project on the internet via ngrok. snapshot Create a database snapshot for one or more projects. ssh Starts a shell session in the container for a service. Uses web service by default. start Start a ddev project. stop Stop and remove the containers of a project. Does not lose or harm anything unless you add --remove-data. version print ddev version and component versions

Flags: -h, --help help for ddev -j, --json-output If true, user-oriented output will be in JSON format. -v, --version version for ddev

Additional help topics: ddev pull Pull files and database using a configured provider plugin. ddev push push files and database using a configured provider plugin.

Use "ddev [command] --help" for more information about a command.

ddev version:

ITEM            VALUE
 DDEV version    v1.18.2
 architecture    amd64
 db              drud/ddev-dbserver-mariadb-10.3:v1.18.2
 dba             phpmyadmin:5
 ddev-ssh-agent  drud/ddev-ssh-agent:v1.18.0
 docker          failed to GetDockerVersion(): Get "http://unix.sock/version": dial unix /var/run/docker.sock: connect: no such file or directory
 docker-compose  v2.2.2
 mutagen         0.12.0
 os              linux
 router          drud/ddev-router:v1.18.2
 web             drud/ddev-webserver:v1.18.2
joshsedl commented 2 years ago

Couldn't recreate this. Are you using the newest docker and ddev version? Have you tried restarting docker after you pulled the repository?

I just freshly installed ddev, updated docker, cloned this repository and executed "ddev drowl-init" inside the cloned repository on my home computer and it worked like a charm!

JPustkuchen commented 2 years ago

Really strange issue, after updating Docker desktop I now get:

Failed to start project for custom command: project ddev-vscode-devcontainer-drupal9-template project root is already set to /home/jpustkuchen/ddev/test-ddev, refusing to change it to /home/jpustkuchen/ddev/drowl_paragraphs_container2layout; you can ddev stop --unlist ddev-vscode-devcontainer-drupal9-template and start again if the listed project root is in error

So docker state indeed seems to be part of the problem. I guess we should create an issue like "ddev custom commands not registered without error" or similar as follow-up upstream.

I think ddev should detect that the environment is not okay instead of simply not listing the command...

I'll investigate further.

JPustkuchen commented 2 years ago

Ah, I see, the problem before indeed was the not running docker desktop (or old version). Now, the issue is, that the ddev project name is already in use. :)

JPustkuchen commented 2 years ago

There was a similar upstream issue at ddev. I added our information there and linked this issue. So this can indeed be closed. https://github.com/drud/ddev/issues/3336

joshsedl commented 2 years ago

Perfect! The Error with the already existing project root happens, when you already cloned the repository before. Therefore I created the 'ddev rename' command, so you can have multiple ddev-vscode-devcontainer instances, but it still isn't fully implemented, so even if you have used it it will still throw that error, see: https://github.com/webksde/ddev-vscode-devcontainer-drupal9-template/issues/29 🍯

JPustkuchen commented 2 years ago

@thomasfrobieter just had the same issue. Did a Docker Desktop (re)start solve it?

thomasfrobieter commented 2 years ago

Haven't tried, i've just fired ddev start, ddev drowl-init worked afterwards.

joshsedl commented 2 years ago

Yea, Docker Desktop seems to be a bit buggy regarding this. I'm going to mention it in the README.