Yii2: yiisoft/yii2 2.0.16.1 requires bower-asset/inputmask ~3.2.2 | ~3.3.5

Created on 22 Mar 2019  ·  8Comments  ·  Source: yiisoft/yii2

It seems that yii2 requires the bower-asset/inputmask package, which does not exist. I read about bower-asset/jquery.inputmask as a dependency of yii, so maybe there is something wrongly configured in the yii package?

However, I haven't used yii and composer very much so far, so the problem might be me and not Yii2 :)

What steps will reproduce the problem?

composer require yiisoft/yii2 2.0.16.1

results in

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for yiisoft/yii2 2.0.16.1 -> satisfiable by yiisoft/yii2[2.0.16.1].
    - yiisoft/yii2 2.0.16.1 requires bower-asset/inputmask ~3.2.2 | ~3.3.5 -> no matching package found.

Additional info

| Q | A
| ---------------- | ---
| Yii version | currently 2.0.12,
| PHP version |
| Operating system | Ubuntu in Docker

My current composer.json

{
    "name": "yiisoft/yii2-app-advanced",
    "description": "Yii 2 Advanced Project Template",
    "keywords": ["yii2", "framework", "advanced", "project template"],
    "homepage": "http://www.yiiframework.com/",
    "type": "project",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/yii2/issues?state=open",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/yii2"
    },
    "minimum-stability": "stable",
    "require": {
        "php": ">=5.4.0",
        "yiisoft/yii2": "~2.0.6",
        "yiisoft/yii2-bootstrap": "~2.0.0",
        "yiisoft/yii2-swiftmailer": "~2.0.0",
        "kartik-v/yii2-icons": "^1.4",
        "kartik-v/yii2-grid": "^3.1",
        "kartik-v/yii2-detail-view": "*",
        "kartik-v/yii2-widget-typeahead": "*",
        "fxp/composer-asset-plugin": "*",
        "himiklab/yii2-handsontable-widget": "*",
        "kartik-v/yii2-widget-select2": "^2.1",
        "2amigos/yii2-chartjs-widget": "~2.0",
        "guzzlehttp/guzzle": "~6.0",
        "yii2tech/spreadsheet": "~1.0.2"
    },
    "require-dev": {
        "yiisoft/yii2-debug": "~2.0.0",
        "yiisoft/yii2-gii": "~2.0.0",
        "yiisoft/yii2-faker": "~2.0.0",

        "codeception/base": "^2.2.3",
        "codeception/verify": "~0.3.1"
    },
    "config": {
        "process-timeout": 1800,
        "fxp-asset":{
            "installer-paths": {
                "npm-asset-library": "vendor/npm",
                "bower-asset-library": "vendor/bower"
            }
        }
    }
}

Most helpful comment

@buttflattery
Switch to asset-packagist repo in composer.json:

First disable fxp, add to config: section:

        "fxp-asset": {
            "enabled": false
        }

Then add repo for asset-packagist:

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

As in the example linked by samdark:

See how it should be configured: https://github.com/yiisoft/yii2-app-basic/blob/master/composer.json#L62

All 8 comments

Awesome! That solved the issue I had. Thanks so much for the real quick response and helpful advise ✨ 👍

guys can you guide what solved the problem as i am unable to understand from the links provided by @samdark

@buttflattery
Switch to asset-packagist repo in composer.json:

First disable fxp, add to config: section:

        "fxp-asset": {
            "enabled": false
        }

Then add repo for asset-packagist:

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

As in the example linked by samdark:

See how it should be configured: https://github.com/yiisoft/yii2-app-basic/blob/master/composer.json#L62

Thanks, @My6UoT9 that will help for sure.

@buttflattery Thanks!

Was this page helpful?
0 / 5 - 0 ratings