Composer installation failed

Created on 5 December 2024, 13 days ago

I am trying to install Commerce POS on a fresh Drupal 10 installation but composer is showing an error !

Steps I went through

  • Install latest Drupal 10 version (10.3.10) via composer using:

composer create-project drupal/recommended-project:^10 "example.com"

  • Visit example.com on my browser to finish Drupal initial installation
  • Install and enable Inline Entity Form Module using:

composer require 'drupal/inline_entity_form:^3.0@RC'

  • Install and enable Commerce Module and all its sub-modules using:

composer require 'drupal/commerce:^3.0@beta'

Until now all is working as expected until I tried to install Commerce POS module using:
composer require 'drupal/commerce_pos:^3.0@alpha'

All I am getting is below error:

user@example.com [~/public_html/pos.example.com]# composer require 'drupal/commerce_pos:^3.0@alpha'
./composer.json has been updated
Running composer update drupal/commerce_pos
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/commerce_pos ^3.0@alpha -> satisfiable by drupal/commerce_pos[3.0.0-alpha1, 3.0.0-alpha2, 3.0.0-alpha3].
    - drupal/commerce_pos[3.0.0-alpha1, ..., 3.0.0-alpha3] require drupal/commerce_pos_keypad * -> satisfiable by drupal/commerce_pos_keypad[2.0.0, ..., 2.6.0].
    - drupal/commerce_pos_keypad[2.0.0, ..., 2.6.0] require drupal/commerce_pos ^2 -> found drupal/commerce_pos[2.0.0-alpha1, ..., 2.6.0] but it conflicts with your root composer.json require (^3.0@alpha).


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Any help please to by pass this error ?

Below is the content of my composer.json file:

{
    "name": "drupal/recommended-project",
    "description": "Project template for Drupal projects with a relocated document root",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "homepage": "https://www.drupal.org/project/drupal",
    "support": {
        "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
        "chat": "https://www.drupal.org/node/314178"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "composer/installers": "^2.0",
        "drupal/commerce": "^2.40",
        "drupal/core-composer-scaffold": "^10.3",
        "drupal/core-project-message": "^10.3",
        "drupal/core-recommended": "^10.3",
        "drupal/inline_entity_form": "^3.0@RC"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "stable",
    "prefer-stable": true,
    "config": {
        "allow-plugins": {
            "composer/installers": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true,
            "phpstan/extension-installer": true,
            "dealerdirect/phpcodesniffer-composer-installer": true,
            "php-http/discovery": true
        },
        "sort-packages": true
    },
    "extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            }
        },
        "installer-paths": {
            "web/core": [
                "type:drupal-core"
            ],
            "web/libraries/{$name}": [
                "type:drupal-library"
            ],
            "web/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "web/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "web/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "drush/Commands/contrib/{$name}": [
                "type:drupal-drush"
            ],
            "web/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "web/profiles/custom/{$name}": [
                "type:drupal-custom-profile"
            ],
            "web/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ]
        },
        "drupal-core-project-message": {
            "include-keys": [
                "homepage",
                "support"
            ],
            "post-create-project-cmd-message": [
                "<bg=blue;fg=white>                                                         </>",
                "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>",
                "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>",
                "<bg=blue;fg=white>                                                         </>",
                "",
                "<bg=yellow;fg=black>Next steps</>:",
                "  * Install the site: https://www.drupal.org/docs/installing-drupal",
                "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
                "  * Get support: https://www.drupal.org/support",
                "  * Get involved with the Drupal community:",
                "      https://www.drupal.org/getting-involved",
                "  * Remove the plugin that prints this message:",
                "      composer remove drupal/core-project-message"
            ]
        }
    }
}

Thank you,

💬 Support request
Status

Active

Version

3.0

Component

Miscellaneous

Created by

🇱🇧Lebanon C.E.A

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024