Yii2: jquery.inputmask dependency no longer available; installs failing

Created on 8 Jun 2017  路  27Comments  路  Source: yiisoft/yii2

What steps will reproduce the problem?

composer global require "fxp/composer-asset-plugin"
composer install

What is the expected result?

Packages to be installed

What do you get instead?

Failed to install

Additional info

| Q | A
| ---------------- | ---
| Yii version | 2.0.x
| PHP version | 7.1
| Operating system | Amazon Linux / OSX

[227.8MB/40.89s] Your requirements could not be resolved to an installable set of packages.
[227.8MB/40.89s] 
  Problem 1
    - yiisoft/yii2 2.0.9 requires bower-asset/jquery.inputmask ~3.2.2 -> no matching package found.
    - yiisoft/yii2 2.0.8 requires bower-asset/jquery.inputmask ~3.2.2 -> no matching package found.
    - yiisoft/yii2 2.0.7 requires bower-asset/jquery.inputmask ~3.2.2 -> no matching package found.
    - yiisoft/yii2 2.0.6 requires bower-asset/jquery.inputmask 3.1.* -> no matching package found.
    - yiisoft/yii2 2.0.12 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
    - yiisoft/yii2 2.0.11.2 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.3 -> no matching package found.
    - yiisoft/yii2 2.0.11.1 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.3 -> no matching package found.
    - yiisoft/yii2 2.0.11 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.3 -> no matching package found.
    - yiisoft/yii2 2.0.10 requires bower-asset/jquery.inputmask ~3.2.2 -> no matching package found.
    - Installation request for yiisoft/yii2 ^2.0.6 -> satisfiable by yiisoft/yii2[2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.6, 2.0.7, 2.0.8, 2.0.9].

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.
[148.4MB/40.93s] Memory usage: 148.38MB (peak: 227.89MB), time: 40.93s
bash-4.2# 

See https://github.com/RobinHerbots/jquery.inputmask/issues/2 the inputmask library is not longer available. From what I can tell it 'was' working due to github aliasing the package. Now the alias is released composer is failing to install.

Most helpful comment

One possible workaround that I've come up with is overriding the jquery.inputmask repository via fxp configuration in composer.json. It might be working. Still haven't tested it, though.

    "config": {
        "fxp-asset": {
            "repositories": {
                "bower-asset/jquery.inputmask": {
                    "type": "bower-github",
                    "url": "https://github.com/petrabarus/jquery.inputmask"
                }
            }
        }
    }

All 27 comments

Would love to know if anyone has found a workaround solution regarding this.

One possible workaround that I've come up with is overriding the jquery.inputmask repository via fxp configuration in composer.json. It might be working. Still haven't tested it, though.

    "config": {
        "fxp-asset": {
            "repositories": {
                "bower-asset/jquery.inputmask": {
                    "type": "bower-github",
                    "url": "https://github.com/petrabarus/jquery.inputmask"
                }
            }
        }
    }

Based on @petrabarus idea what solved it for me was this config (still using the official repo as pointed in https://github.com/RobinHerbots/jquery.inputmask/issues/2):

  "config": {
    "fxp-asset": {
      "installer-paths": {
        "npm-asset-library": "vendor/npm",
        "bower-asset-library": "vendor/bower"
      },
      "repositories": [
        {
          "type": "bower-vcs",
          "url": "https://github.com/RobinHerbots/Inputmask.git",
          "name": "bower-asset/jquery.inputmask"
        }
      ]
    }
  },

@ddinchev I tried that, somewhat still not working. Have you tried in fresh clone or clear composer cache?

Yes, make sure you are using the latest fxp/composer-asset-plugin (I'm using 1.4.1) as the config format has changed. Also after changing composer.json you should do a composer update as composer install only would care for the composer.lock file which would remain unchanged until update.

Okay, I just fixed the fxp asset version. This seems to be working. Thanks!

Package author asked github to alias to old name. Will see if that helps.

@samdark I guess, the current dependency will need change to point to new repo in 2.0.13.

Not if alias will be there.

@ddinchev it's a good workaround but it works only local (I think there's something cached, despite clearing). On a fresh VM it doesn't work yet.

@marcobiraghi what's your composer and fxp/composer-asset-plugin version?

@petrabarus 1.3.1

@petrabarus fxp doesn't matter in this case. It's package that was changed.

as far as I see, this could solve the issue: https://github.com/RobinHerbots/jquery.inputmask/issues/2#issuecomment-307345337

@samdark i think it's the fxp configuration format. before @ddinchev mentioned it was working in his machine, my fxp version was below 1.3.1. after i upgrade to 1.3.1, it's working fine.

@petrabarus can you please say me, how to upgrade to version 1.4.1?

The latest version of composer-asset-plugin is 1.3.1:
https://packagist.org/packages/fxp/composer-asset-plugin#v1.3.1

Problem 1
- The requested package fxp/composer-asset-plugin ^1.4 is satisfiable by fxp/composer-asset-plugin[1.4.x-dev] but these conflict with your requirements or minimum-stability.

@iskander-g

Ah i apologize, i was mixed. The the composer was 1.4.1, and the fxp was 1.3.1.
In mine it's working, though.

i have same versions.

i tried your config and ddinchev's one, anyway nothing doesn't work :-(

Here's my step.

composer self-update 1.4.1
composer global require "fxp/composer-asset-plugin:1.3.1"
composer clear-cache
composer update

@petrabarus , correct is "clear-cache".

looks like the redirect is back in place now, so that is why it's working again

Yes, back to work! 馃帀

I was helped by the following (maybe useful to someone):

  1. ddinchev's solution - I'm not sure if this is necessary, but it worked
  2. $ composer global require "fxp/composer-asset-plugin:^1.2.0"
  3. $ composer require bower-asset/jquery.inputmask

After this composer updated all dependencies without any problems:
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

  1. sudo composer self-update
  2. composer update yiisoft/yii2 yiisoft/yii2-composer
  3. composer require bower-asset/jquery.inputmask
  4. composer update

worked for me with stability dev

Run only this command in Git Bash in your project repository:

$composer self-update
$composer update yiisoft/yii2 yiisoft/yii2-composer
$composer require bower-asset/jquery.inputmask
$composer update

Was this page helpful?
0 / 5 - 0 ratings