When I try to install either the RC or dev version using composer, I get the following error:

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

  Problem 1
    - drupal/fontawesome_iconpicker dev-2.x requires npm-asset/fontawesome-iconpicker ^1.3 -> could not be found in any version, there may be a typo in the package name.
    - drupal/fontawesome_iconpicker 2.x-dev is an alias of drupal/fontawesome_iconpicker dev-2.x and thus requires it to be installed too.
    - Root composer.json requires drupal/fontawesome_iconpicker 2.x-dev@dev -> satisfiable by drupal/fontawesome_iconpicker[2.x-dev (alias of dev-2.x)].

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.
 - It's a private package and you forgot to add a custom repository to find it

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

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

On the main page it says that fontawesome-iconpicker 1.3.1 is required. How do I satisfy that dependency with composer?

Thanks!

Comments

mr.andrey created an issue. See original summary.

Christopher Riley’s picture

I have the same issue. Suggestions?

d34dman’s picture

Solution: Use https://asset-packagist.org

Steps:
Edit your composer.json to include following,

"repositories": [
    {
        "type": "composer",
        "url": "https://asset-packagist.org"
    }
]

Once you add asset-packagist.org to your repositories, the error you are facing would be resolved. However, it will probably place the library in the wrong folder. So you would also need to map the folder location for the library to point to drupal libraries folder. Check out composer installer-paths for more details ( https://getcomposer.org/doc/faqs/how-do-i-install-a-package-to-a-custom-...)

flyke’s picture

Full steps that worked for me.

Add the asset-packagist to the repositories section of your composer.json file:

    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        {
            "type": "composer",
            "url": "https://packagist.org"
        },
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        },

Require this library to be able to move packages outside vendor folder:
composer require mnsami/composer-custom-directory-installer

Adjust your installer-paths section of your composer.json file to move the fontawesome iconpicker also to your libraries folder:

        "installer-paths": {
            "web/core": [
                "type:drupal-core"
            ],
            "web/libraries/{$name}": [
                "npm-asset/fontawesome-iconpicker",
                "itsjavi/fontawesome-iconpicker",
                "type:drupal-library"
            ],

remove the existing drupal module first via composer:
composer remove drupal/fontawesome_iconpicker

now add it again:
composer require drupal/fontawesome_iconpicker

d34dman’s picture

Status: Active » Needs review

This should be fixed.
Instead of relying on composer to manage 3rd party library beyond our control, added dependency to https://packagist.org/packages/d34dman/vanilla-icon-picker to resolve the issue without much composer hackery. Please test and let me know if this works for you.

Try,
composer require drupal/fontawesome_iconpicker:^3

d34dman’s picture

Status: Needs review » Fixed

After a much await, we have a working composer installation (fix in 3.x-dev, 3.0.0-rc1)

Marking this as fixed.

Check https://www.drupal.org/project/fontawesome_iconpicker/issues/3359673#com... for report.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.