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


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.


We have documented this process on the Drupal Commerce docs website at http://docs.drupalcommerce.org/v2/index.html

But here are the instructions for an existing site

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

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.


Try add in your composer.json file commerceguys lines:

"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" },

and then run composer update, clear cache and try again to install Address, this works for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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