Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Custom command not found when running without Docker #164

Open
thierrydallacroce opened this issue Feb 25, 2020 · 1 comment
Open

Custom command not found when running without Docker #164

thierrydallacroce opened this issue Feb 25, 2020 · 1 comment
Labels

Comments

@thierrydallacroce
Copy link
Contributor

Our project, which utilizes dkan2 and dkan-tools, has its own custom dkan-tools command in namespace DkanTools\Command. When running within Docker, dkan-tools finds the command just fine. However, when running without Docker, dktl-tools does not find the custom command and throws the following error:

[Symfony\Component\Console\Exception\CommandNotFoundException] There are no commands defined in the ... namespace.

The issue seems to originate in dkan-tools' composer.json, specifically line 14 of the autoload section:

    "DkanTools\\Custom\\": "/var/www/src/command"

Dkan-tools wrongly assumes /var/www is a relevant path when DKTL_MODE is HOST.

@thierrydallacroce
Copy link
Contributor Author

As a workaround, here are the steps @fmizzell proposed which fixed our custom DKTL command locally, without Docker:

  1. Set the above path for the environment
  2. rm -rf vendor composer.lock
  3. composer install

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants