Hi I am trying to setup my new Drupal 8 site with composer, but I got few issues.

I tried to setup the site site by following the Guide from here and was able to setup the site successfully.

After that I tried to install a custom module which is hosted on Bitbucket and I am able to download the package using Composer, but the problem is the module has some other contributed module dependency but the dependency module is not downloaded along with the custom module.

I followed the guide from here and added composer.json file to my custom module along with the dependency, but after running composer require custom/custom_module only the custom module is installed but not the dependency.

My root directory composer.json file repositories section looks like this.

"repositories": [
        "type": "composer",
        "url": "https://packages.drupal.org/8"
      "type": "package",
      "package": {
        "name": "custom/custom_module",
        "version": "master",
        "type": "drupal-custom-module",
        "source": {
          "type": "git",
          "url": "git@bitbucket.org:username/custom-module.git",
          "reference": "master"

The composer.json file from the custom module is the following.

    "name": "custom/custom_module",
    "description": "This is a Custom Module with Different functionalities.",
    "type": "drupal-custom-module",
    "minimum-stability": "dev",
    "require": {
        "drupal/restui": "~1.16"

I also chaged the line "drupal/restui": "~1.16" as "drupal/restui": "^1.16" but with no success.

I even tried running composer update in the custom module directory as I was not sure whether dependencies will be installed along with custom module. After running composer update in the custom module directory I got this error.

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

Problem 1

  • The requested package drupal/restui could not be found in any version, there may be a typo in the package name.

Potential causes:

On Drupal.org I can find the module with that version here.

  • I don't see a composer.json file in that Drupal module (Rest UI). Are those still required? – Kevin Feb 8 '19 at 15:21
  • I cant find that pacakge on packagist: packagist.org/search/?q=drupal%2Frestui – Manuel Garcia Feb 8 '19 at 15:38
  • They'd be on packages.drupal.org/8 that's why you have to declare it as a repo in your composer – Leigh Feb 8 '19 at 16:12
  • I think you're right Kevin, something isn't setup right with restui. If you try doing "composer show drupal/restui" from the root of the site it cant be found so doesnt appear to exist – Leigh Feb 8 '19 at 16:15
  • 1
    I asked because the Rest UI module requires at least Drupal 8.2.x. – kiamlaluno Feb 11 '19 at 7:58

Your Answer

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

Browse other questions tagged or ask your own question.