While installing Drupal Commerce 8.x-2.x-dev on Drupal 8.0.0-rc4, I'm greeted by the announcements.

Commerce Price requires the commerceguys/intl library.
Commerce Tax requires the commerceguys/tax library.
Address requires the commerceguys/addressing library.

How do I that? It's probably so obvious that I'm overlooking it.

Message concerning required external libraries for Drupal Commerce 2.x


5 Answers 5


Download composer_manager into your modules directory.

From the Drupal root directory, initialize composer_manager, and run it for the first time:

php modules/composer_manager/scripts/init.php

composer drupal-update

composer dump-autoload

This will download the required libraries into the root vendor/ directory.

Enable modules now.


I ran into an issue where even though I installed via composer require commerceguys/addressing it picked up the stable release instead of the release required by drupal/address, and the error message is confusing.

However once I confirmed that the drupal module required a dev release rather than the stable release I was able to install by changing the version in composer.json to ^1.0 instead of ^0.8.

In development it is often easier to checkout modules via git into the modules directory rather than to use the complexity of composer projects or requiring via --prefer-source because composer will remove development/IDE directories that you may be using in order to hack or develop on those modules. Thus it is important to pay strict attention to those modules' individual composer.json files and provide the correct versions when running composer require in the drupal root directory.


The link to the installation instructions listed earlier seems to have changed. Developer guide > Installation and updates > Installing says that the following command will download Drupal 8 and Commerce 2.x with all dependencies in the mystore folder.

composer create-project drupalcommerce/project-base mystore --stability dev

Add these lines to the composer.json file.

"require": {
        "composer/installers": "^1.2",
        "drupal/core-composer-scaffold": "^8.8",
        "drupal/core-project-message": "^8.8",
        "drupal/core-recommended": "^8.8",
        "drupal/core-vendor-hardening": "^8.8",
    **"commerceguys/intl": "dev-master",
        "commerceguys/addressing": "dev-master"**

Then run composer update, clear the cache, and try again to install Address. This worked for me.


We have documented this process on the Drupal Commerce docs website at http://docs.drupalcommerce.org/v2/index.html. These are the commands to run on an existing site.

drupal module:download composer_manager 
php modules/contrib/composer_manager/scripts/init.php
composer drupal-update 
composer dump-autoload

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