通过执行以下drupal命令
来安装Drupal Commerce 2.x模块drupal module:install commerce_product commerce_checkout commerce_cart commerce_tax
生成以下错误
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "module:install" is not defined.
Did you mean one of these?
site:install
module:download
尝试
drupal module:download commerce_product commerce_checkout commerce_cart commerce_tax
生成以下错误
Fatal error: Uncaught Error: Call to undefined function Drupal\Console\Command\drupal_static_reset() in C:\Users\Ali\AppData\Roaming\Composer\vendor\drupal\console\src\Command\ProjectDownloadTrait.php:55
Stack trace:
#0 C:\Users\Ali\AppData\Roaming\Composer\vendor\drupal\console\src\Command\Module\DownloadCommand.php(64): Drupal\Console\Command\Module\DownloadCommand->downloadModules(Object(Drupal\Console\Style\DrupalStyle), Array, false)
#1 C:\Users\Ali\AppData\Roaming\Composer\vendor\symfony\console\Command\Command.php(259): Drupal\Console\Command\Module\DownloadCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Drupal\Console\Style\DrupalStyle))
#2 C:\Users\Ali\AppData\Roaming\Composer\vendor\symfony\console\Application.php(863): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Drupal\Console\Style\DrupalStyle))
#3 C:\Users\Ali\AppData\Roaming\Composer\vendor\symfony\console\Application.php(192): Symfony\Component\Console\Application->doRun in C:\Users\Ali\AppData\Roaming\Composer\vendor\drupal\console\src\Command\ProjectDownloadTrait.php on line 55
有关如何解决此问题的任何想法?
答案 0 :(得分:0)
你可以这样试试:drush en commerce
之后你想下载吗? (是/否):y,它会为你下载。
希望我能帮忙。
答案 1 :(得分:0)
您可以使用composer轻松安装:
cd /path/to/drupal8
composer require "drupal/<modulename>:<version>"
或没有版本:
composer require "drupal/<modulename>"
例如:
composer require "drupal/commerce_product"
答案 2 :(得分:0)
你可以这样:
composer create-project drupalcommerce/project-base some-dir --stability dev --no-interaction
这是在README.md中解释的: https://github.com/drupalcommerce/project-base/blob/8.x/README.md