Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Fix "no matching package found" error #4

Open
otarza opened this issue Jun 20, 2017 · 3 comments
Open

Fix "no matching package found" error #4

otarza opened this issue Jun 20, 2017 · 3 comments

Comments

@otarza
Copy link
Contributor

otarza commented Jun 20, 2017

While trying to install this module using composer I'm getting following error:

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

  Problem 1
    - Installation request for drupal/simplemde 1.0-alpha3 -> satisfiable by drupal/simplemde[1.0.0-alpha3].
    - drupal/simplemde 1.0.0-alpha3 requires sparksuite/simplemde-markdown-editor 1.11.2 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Steps to reproduce:

  1. Add "drupal/simplemde": "1.0-alpha3", to your composer.json;
  2. Run composer update;

I'm not sure what is causing this.

Workaround solution:

Add simplemde-markdown-editor in repositories of your composer.json file:

"repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        {
            "type": "package",
            "package": {
                "name": "sparksuite/simplemde-markdown-editor",
                "version": "1.11.2",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/sparksuite/simplemde-markdown-editor/archive/1.11.2.zip",
                    "type": "zip"
                }
            }
        }
    ],

Even workaround solution prevents the error, module itself still can't be enabled if you don't add "drupal/markdown": "1.2", as a dependency under your main composer.json, but this might be scope of another issue?

@otarza
Copy link
Contributor Author

otarza commented Jun 20, 2017

Similar issue: https://www.drupal.org/node/2770807

@diqidoq
Copy link

diqidoq commented Oct 23, 2018

Add simplemde-markdown-editor in repositories of your composer.json file:

Since this is a Drupal integration module it should be stated clearly which composer.json file is referred to here. The composer.json file of the module or of Drupal core.

I also added a new issue on D.O. regarding this issue since there is no issue reflecting the fact that this module is not installable via composer at the moment by using the Drupal docs recommended way. https://www.drupal.org/project/simplemde/issues/3008627

@GuyPaddock
Copy link

IMO The docs for this project just need to add a note about adding the dependency under "repositories" in the Drupal site's composer.json file.

The reason is noted briefly here:
https://getcomposer.org/doc/faqs/why-can%27t-composer-load-repositories-recursively.md

You may run into problems when using custom repositories because Composer does not load the repositories of your requirements, so you have to redefine those repositories in all your composer.json files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants