Problem/Motivation

I cannot install USWDS on my Drupal 11 site because it depends on classy which only runs on 9 or 10.

Steps to reproduce

  1. Install drupal 11 site.
  2. Run composer require 'drupal/uswds:^3.1'

My error message shows:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/classy * -> satisfiable by drupal/classy[1.0.0, 1.0.1, 1.0.2].
    - drupal/classy 1.0.0 requires drupal/core ~8.0 -> found drupal/core[8.0.0, ..., 8.9.20] but the package is fixed to 11.1.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - drupal/classy[1.0.1, ..., 1.0.2] require drupal/core ^9 || ^10 -> found drupal/core[9.0.0, ..., 9.5.11, 10.0.0, ..., 10.4.1] but the package is fixed to 11.1.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

mollydev created an issue. See original summary.

jaydarnell’s picture

This is an issue with the classy base theme and not an issue with the uswds theme. Please see the following issue for the classy theme to resolve the D11 compatibility problem: https://www.drupal.org/project/classy/issues/3461089

You'll want to explicitly require the classy theme first and then apply the patch provided in the link above. See the following article for guidance on applying patches: https://www.drupal.org/docs/develop/using-composer/manage-dependencies#p...

Once you have the patched version of classy pulled down with composer, you should be able to require the uswds project like you did before without any issues.

jaydarnell’s picture

Status: Active » Closed (works as designed)