Composer php 路径“/“模块/定制”;运行drupal generate:模块时无效

Composer php 路径“/“模块/定制”;运行drupal generate:模块时无效,composer-php,drupal-8,drupal-console,Composer Php,Drupal 8,Drupal Console,我试图在使用Drupal控制台时安装Drupal插件。 我在/var/www/drupalvm/drupal/web中运行它$ 我检查了我的drupal.composer.json文件,我相信一切都是正确的 "installer-paths": { "web/core": ["type:drupal-core"], "web/modules/contrib/{$name}": ["type:drupal-module"], "web/profiles/contrib/{$

我试图在使用Drupal控制台时安装Drupal插件。 我在/var/www/drupalvm/drupal/web中运行它$

我检查了我的drupal.composer.json文件,我相信一切都是正确的

"installer-paths": {
    "web/core": ["type:drupal-core"],
    "web/modules/contrib/{$name}": ["type:drupal-module"],
    "web/profiles/contrib/{$name}": ["type:drupal-profile"],
    "web/themes/contrib/{$name}": ["type:drupal-theme"],
    "drush/contrib/{$name}": ["type:drupal-drush"]
}

我的跑步:

drupal生成:模块--module=“我的签出流”
--机器名称=“我的结账流程”
--模块路径=“/modules/custom”
--description=“我的签出流程”
--core=“8.x”
--package=“LSB”
--作曲家
--dependencies=“commerce:commerce\u checkout”

谢谢你

问题是你提供的是一个绝对的
--模块路径
/modules/custom
,这在你的系统上是不存在的

您需要提供相对路径或现有绝对路径

解决方案是省略前导的
/
或使用绝对路径:

--module-path='modules/custom'
# ... or ...
--module-path="$(realpath modules/custom)"

请在问题中添加确切的异常/错误消息。很抱歉,我没有看到,我忘了把它放在这里,这里我得到的:在Validator.php第174行:Path“/modules/custom”无效。您需要提供有效的路径。