0

So far, Drupal Commerce is the best module for e-commerce on Drupal. But now Drupal 9.0.0 was released, and when I want to install Drupal Commerce on Drupal 9, both way is out of luck.

Both way I mean, installing Drupal Commerce via Drupal Console or Ludwigh Module. Here is the official documentation on how to install Drupal Commerce: https://docs.drupalcommerce.org/commerce2/developer-guide/install-update/installation

On Existing Site

1. First method, Drupal Console: error when try to install it via composer with command:

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

It will produce a long error message.

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- drupal/console 1.9.4 requires drupal/console-core 1.9.4 -> satisfiable by drupal/console-core[1.9.4].
- Conclusion: don't install drupal/console-core 1.9.4
- drupal/console 1.9.3 requires drupal/console-core 1.9.3 -> satisfiable by drupal/console-core[1.9.3].
- Conclusion: don't install drupal/console-core 1.9.3
- drupal/console 1.9.2 requires drupal/console-core 1.9.2 -> satisfiable by drupal/console-core[1.9.2].
- Conclusion: don't install drupal/console-core 1.9.2
- drupal/console 1.9.1 requires drupal/console-core 1.9.1 -> satisfiable by drupal/console-core[1.9.1].
- Conclusion: don't install drupal/console-core 1.9.1
- drupal/console v1.9.0 requires drupal/console-core 1.9.0 -> satisfiable by drupal/console-core[v1.9.0].
- Conclusion: don't install drupal/console-core v1.9.0
- drupal/console 1.8.0 requires drupal/console-core 1.8.0 -> satisfiable by drupal/console-core[1.8.0].
- Conclusion: don't install drupal/console-core 1.8.0
- drupal/console 1.7.0 requires drupal/console-core 1.7.0 -> satisfiable by drupal/console-core[1.7.0].
- Conclusion: don't install drupal/console-core 1.7.0
- drupal/console 1.6.1 requires drupal/console-core 1.6.1 -> satisfiable by drupal/console-core[1.6.1].
- Conclusion: don't install drupal/console-core 1.6.1
- drupal/console 1.6.0 requires drupal/console-core 1.6.0 -> satisfiable by drupal/console-core[1.6.0].
- Conclusion: don't install drupal/console-core 1.6.0
- drupal/console 1.5.0 requires drupal/console-core 1.5.0 -> satisfiable by drupal/console-core[1.5.0].
- Conclusion: don't install drupal/console-core 1.5.0
- drupal/console 1.4.0 requires drupal/console-core 1.4.0 -> satisfiable by drupal/console-core[1.4.0].
- Conclusion: don't install drupal/console-core 1.4.0
- drupal/console 1.3.2 requires drupal/console-core 1.3.2 -> satisfiable by drupal/console-core[1.3.2].
- Conclusion: don't install drupal/console-core 1.3.2
- drupal/console 1.3.1 requires drupal/console-core 1.3.1 -> satisfiable by drupal/console-core[1.3.1].
- Conclusion: don't install drupal/console-core 1.3.1
- drupal/console 1.3.0 requires drupal/console-core 1.3.0 -> satisfiable by drupal/console-core[1.3.0].
- Conclusion: don't install drupal/console-core 1.3.0
- drupal/console 1.2.0 requires drupal/console-core 1.2.0 -> satisfiable by drupal/console-core[1.2.0].
- Conclusion: don't install drupal/console-core 1.2.0
- drupal/console 1.1.1 requires drupal/console-core 1.1.1 -> satisfiable by drupal/console-core[1.1.1].
- Conclusion: don't install drupal/console-core 1.1.1
- drupal/console 1.1.0 requires drupal/console-core 1.1.0 -> satisfiable by drupal/console-core[1.1.0].
- Conclusion: don't install drupal/console-core 1.1.0
- drupal/console 1.0.2 requires drupal/console-core 1.0.2 -> satisfiable by drupal/console-core[1.0.2].
- Conclusion: don't install drupal/console-core 1.0.2
- drupal/console 1.0.1 requires drupal/console-core 1.0.1 -> satisfiable by drupal/console-core[1.0.1].
- Conclusion: don't install drupal/console-core 1.0.1
- drupal/console 1.0.0 requires drupal/console-core 1.0.0 -> satisfiable by drupal/console-core[1.0.0].
- Conclusion: don't install drupal/console-core 1.0.0
- drupal/console 1.0.0-rc26 requires drupal/console-core 1.0.0-rc26 -> satisfiable by drupal/console-core[1.0.0-rc26].
- Conclusion: don't install drupal/console-core 1.0.0-rc26
- drupal/console 1.0.0-rc15 requires doctrine/collections 1.3.0 -> satisfiable by doctrine/collections[v1.3.0].
- drupal/console 1.0.0-rc16 requires doctrine/collections 1.3.0 -> satisfiable by doctrine/collections[v1.3.0].
- drupal/console 1.0.0-rc23 requires doctrine/collections 1.3.* -> satisfiable by doctrine/collections[v1.3.0].
- drupal/console 1.0.0-rc24 requires doctrine/collections 1.3.* -> satisfiable by doctrine/collections[v1.3.0].
- drupal/console 1.0.0-rc25 requires doctrine/collections 1.3.* -> satisfiable by doctrine/collections[v1.3.0].
- Conclusion: don't install doctrine/collections v1.3.0
- Conclusion: don't install drupal/console 1.0.0-rc22
- Conclusion: don't install drupal/console 1.0.0-rc21
- Conclusion: don't install drupal/console 1.0.0-rc20
- Conclusion: don't install drupal/console 1.0.0-rc19
- Conclusion: don't install drupal/console 1.0.0-rc18
- Conclusion: don't install drupal/console 1.0.0-rc17
- Conclusion: don't install drupal/console 1.0.0-rc14
- Conclusion: don't install drupal/console 1.0.0-rc13
- Conclusion: don't install drupal/console 1.0.0-rc12
- Conclusion: don't install drupal/console 1.0.0-rc11
- Conclusion: don't install drupal/console 1.0.0-rc10
- Conclusion: don't install drupal/console 1.0.0-rc9
- Conclusion: don't install drupal/console 1.0.0-rc8
- Conclusion: don't install drupal/console 1.0.0-rc7
- Conclusion: don't install drupal/console 1.0.0-rc6
- Conclusion: don't install drupal/console 1.0.0-rc5
- Conclusion: don't install drupal/console 1.0.0-rc4
- Conclusion: don't install drupal/console 1.0.0-rc3
- Conclusion: don't install drupal/console 1.0.0-rc2
- Conclusion: don't install drupal/console 1.0.0-rc1
- Conclusion: don't install drupal/console 1.0.0-beta5
- Conclusion: don't install drupal/console 1.0.0-beta4
- Conclusion: don't install drupal/console 1.0.0-beta3
- Conclusion: don't install drupal/console 1.0.0-beta2
- Conclusion: don't install drupal/console 1.0.0-beta1
- Conclusion: don't install drupal/console 1.0.0-alpha2
- Conclusion: remove symfony/console v4.4.9
- Installation request for doctrine/collections (locked at 1.6.5) -> satisfiable by doctrine/collections[1.6.5].
- Installation request for doctrine/annotations (locked at 1.10.3) -> satisfiable by doctrine/annotations[1.10.3].
- Installation request for drupal/console ~1.0 -> satisfiable by drupal/console[1.0.0, 1.0.0-alpha1, 1.0.0-alpha2, 1.0.0-beta1, 1.0.0-beta2, 1.0.0-beta3, 1.0.0-beta4, 1.0.0-beta5, 1.0.0-rc1, 1.0.0-rc10, 1.0.0-rc11, 1.0.0-rc12, 1.0.0-rc13, 1.0.0-rc14, 1.0.0-rc15, 1.0.0-rc16, 1.0.0-rc17, 1.0.0-rc18, 1.0.0-rc19, 1.0.0-rc2, 1.0.0-rc20, 1.0.0-rc21, 1.0.0-rc22, 1.0.0-rc23, 1.0.0-rc24, 1.0.0-rc25, 1.0.0-rc26, 1.0.0-rc3, 1.0.0-rc4, 1.0.0-rc5, 1.0.0-rc6, 1.0.0-rc7, 1.0.0-rc8, 1.0.0-rc9, 1.0.1, 1.0.2, 1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.5.0, 1.6.0, 1.6.1, 1.7.0, 1.8.0, 1.9.1, 1.9.2, 1.9.3, 1.9.4, v1.9.0].
- Conclusion: don't install symfony/console v4.4.9
- drupal/console 1.0.0-alpha1 requires symfony/event-dispatcher ~2.8 -> satisfiable by symfony/event-dispatcher[2.8.x-dev, v2.8.0, v2.8.0-BETA1, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.18, v2.8.19, v2.8.2, v2.8.20, v2.8.21, v2.8.22, v2.8.23, v2.8.24, v2.8.25, v2.8.26, v2.8.27, v2.8.28, v2.8.29, v2.8.3, v2.8.30, v2.8.31, v2.8.32, v2.8.33, v2.8.34, v2.8.35, v2.8.36, v2.8.37, v2.8.38, v2.8.39, v2.8.4, v2.8.40, v2.8.41, v2.8.42, v2.8.43, v2.8.44, v2.8.45, v2.8.46, v2.8.47, v2.8.48, v2.8.49, v2.8.5, v2.8.50, v2.8.52, v2.8.6, v2.8.7, v2.8.8, v2.8.9].
- symfony/event-dispatcher 2.8.x-dev conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.0 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.0-BETA1 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.1 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.10 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.11 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.12 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.13 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.14 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.15 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.16 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.17 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.18 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.19 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.2 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.20 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.21 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.22 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.23 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.24 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.25 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.26 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.27 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.28 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.29 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.3 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.30 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.31 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.32 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.33 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.34 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.35 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.36 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.37 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.38 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.39 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.4 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.40 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.41 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.42 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.43 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.44 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.45 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.46 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.47 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.48 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.49 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.5 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.50 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.52 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.6 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.7 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.8 conflicts with symfony/console[v4.4.9].
- symfony/event-dispatcher v2.8.9 conflicts with symfony/console[v4.4.9].
- Installation request for symfony/console (locked at v4.4.9) -> satisfiable by symfony/console[v4.4.9].

Installation failed, reverting ./composer.json to its original content.

After searching for solution, I know the error on installing Drupal Console is because it is not supporting Symfony 4 yet (Drupal 9 use Symfony version 4). Any help on this?

2. Second method, Ludwig module: This way simply doesn't work due to Ludwig module only supporting Drupal 8. https://www.drupal.org/project/ludwig

On New Site Alternatively, when installing using New Site also producing error when browsing:

[Fri Jun 05 23:24:21.842746 2020] [php7:notice] [pid 7092:tid 1560] [client 127.0.0.1:63807] TypeError: Argument 1 passed to Symfony\\Component\\HttpFoundation\\ParameterBag::replace() must be of the type array, null given, called in C:\\xampp\\htdocs\\mystore\\web\\core\\lib\\Drupal\\Core\\Routing\\RouteProvider.php on line 171 in C:\\xampp\\htdocs\\mystore\\vendor\\symfony\\http-foundation\\ParameterBag.php on line 59 #0 C:\\xampp\\htdocs\\mystore\\web\\core\\lib\\Drupal\\Core\\Routing\\RouteProvider.php(171): Symfony\\Component\\HttpFoundation\\ParameterBag->replace(NULL)\n#1 C:\\xampp\\htdocs\\mystore\\web\\core\\lib\\Drupal\\Core\\Routing\\Router.php(239): Drupal\\Core\\Routing\\RouteProvider->getRouteCollectionForRequest(Object(Symfony\\Component\\HttpFoundation\\Request))\n#2 C:\\xampp\\htdocs\\mystore\\web\\core\\lib\\Drupal\\Core\\Routing\\Router.php(123): Drupal\\Core\\Routing\\Router->getInitialRouteCollection(Object(Symfony\\Component\\HttpFoundation\\Request))\n#3 C:\\xampp\\htdocs\\mystore\\web\\core\\lib\\Drupal\\Core\\Routing\\AccessAwareRouter.php(92): Drupal\\Core\\Routing\\Router->matchRequest(Object(Symfony\\Component\\HttpFoundation\\Request))\n#4 C:\\xampp\\htdocs\\mystore\\vendor\\symfony\\http-kernel\\EventListener\\RouterListener.php(113): Drupal\\Core\\Routing\\AccessAwareRouter->matchRequest(Object(Symfony\\Component\\HttpFoundation\\Request))\n#5 [internal function]: Symfony\\Component\\HttpKernel\\EventListener\\RouterListener->onKernelRequest(Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent), 'kernel.request', Object(Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))\n#6 C:\\xampp\\htdocs\\mystore\\web\\core\\lib\\Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent), 'kernel.request', Object(Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))\n#7 C:\\xampp\\htdocs\\mystore\\vendor\\symfony\\http-kernel\\HttpKernel.php(127): Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher->dispatch('kernel.request', Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent))\n#8 C:\\xampp\\htdocs\\mystore\\vendor\\symfony\\http-kernel\\HttpKernel.php(68): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#9 C:\\xampp\\htdocs\\mystore\\web\\core\\lib\\Drupal\\Core\\StackMiddleware\\Session.php(57): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#10 C:\\xampp\\htdocs\\mystore\\web\\core\\lib\\Drupal\\Core\\StackMiddleware\\KernelPreHandle.php(47): Drupal\\Core\\StackMiddleware\\Session->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#11 C:\\xampp\\htdocs\\mystore\\web\\core\\modules\\page_cache\\src\\StackMiddleware\\PageCache.php(106): Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#12 C:\\xampp\\htdocs\\mystore\\web\\core\\modules\\page_cache\\src\\StackMiddleware\\PageCache.php(85): Drupal\\page_cache\\StackMiddleware\\PageCache->pass(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#13 C:\\xampp\\htdocs\\mystore\\web\\core\\lib\\Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware.php(47): Drupal\\page_cache\\StackMiddleware\\PageCache->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#14 C:\\xampp\\htdocs\\mystore\\web\\core\\lib\\Drupal\\Core\\StackMiddleware\\NegotiationMiddleware.php(52): Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#15 C:\\xampp\\htdocs\\mystore\\vendor\\stack\\builder\\src\\Stack\\StackedHttpKernel.php(23): Drupal\\Core\\StackMiddleware\\NegotiationMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#16 C:\\xampp\\htdocs\\mystore\\web\\core\\lib\\Drupal\\Core\\DrupalKernel.php(708): Stack\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#17 C:\\xampp\\htdocs\\mystore\\web\\index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#18 {main}

Has anyone had any way to successfully install Drupal Commerce on Drupal 9?

2

This doesn't look like a question of Drupal Commerce compatibility at all ... all your error messages are from Drupal Console, which is not a requirement for Drupal Commerce. Just use Composer to fetch the module and then drush or the Drupal UI to install it.

| improve this answer | |
  • Drupal Console is one of Drupal Commerce requirement. The fact is you can't install Drupal Commerce without Drupal Console. (Drupal 8.8 >) See this documentation for more detail, docs.drupalcommerce.org/commerce2/developer-guide/… – Narinlab Jun 6 at 11:54
  • 1
    @Narinlab It’s not a requirement, just one way to install. Suggested to follow Ryan’s advice ;) – David Thomas Jun 6 at 12:27
  • Hi David, thankyou for your info. I tried three way to get Drupal Commerce installed, as the documentation suggest. All failed. But for more clear, how can I install it using composer only? – Narinlab Jun 6 at 12:33
  • I'm stuck after: composer require "drupal/commerce" because, to enable/install it, I must execute: drupal module:install commerce_product commerce_checkout commerce_cart and that requiring problematic Drupal Console. – Narinlab Jun 6 at 12:39
  • 1
    Drupal Console is a dead project. We have been slow to scrub mentions of it (and replace it with Drush) because it was very quickly abandoned. Once you remove Console, your Composer commands will work again. Issue: drupal.org/project/commerce/issues/3147240 – Bojan Zivanovic Jun 6 at 13:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.