Using jQuery 1.11.*

Hi,

I’m trying to force the use of jQuery 1.11.* with this composer.json:




...

"require": {

        "php": ">=5.4.0",

        "yiisoft/yii2": "*",

        "yiisoft/yii2-bootstrap": "*",

        "yiisoft/yii2-swiftmailer": "*",

        "kartik-v/yii2-widget-datepicker": "*",

        "kartik-v/yii2-widget-select2": "*",

        "mikehaertl/php-pdftk": "*",

        "bower-asset/jquery": "1.11.*@stable",

        "bower-asset/respond-minmax": "*"

    },

...



But composer return this error:




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


  Problem 1

    - The requested package bower-asset/jquery could not be found in any version, there may be a typo in the package name.

  Problem 2

    - yiisoft/yii2 2.0.2 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.

    - yiisoft/yii2 2.0.1 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.

    - yiisoft/yii2 2.0.0 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.

    - yiisoft/yii2 2.0.2 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.

    - Installation request for yiisoft/yii2 * -> satisfiable by yiisoft/yii2[2.0.0, 2.0.1, 2.0.2].



I’ve updated composer and composer-asset-plugin:




$ composer self-update

$ composer global require "fxp/composer-asset-plugin:1.0.0"



But the problem still remains, what did I do wrong?

Try deleting vendor first. fxp plugin caches packages info in order to be faster so it’s not possible to downgrade w/o deleting vendor.

It works!

Thank you

Hello,

Myself and my coworker (two different computers) are having the same issue after running composer update.

I would link my screenshot but as a first time poster the system will not allow it! :rolleyes: However, the error is identical to Nicola’s error above for both myself and my coworker.

Here is the composer.json file content:


{

    "name": "yiisoft/yii2-app-advanced",

    "description": "Yii 2 Advanced Application Template",

    "keywords": ["yii2", "framework", "advanced", "application template"],

    "homepage": "removed for post purposes",

    "type": "project",

    "license": "BSD-3-Clause",

    "support": {

        "issues": "removed for post purposes",

        "forum": "removed for post purposes",

        "wiki": "removed for post purposes",

        "irc": "removed for post purposes",

        "source": "removed for post purposes"

    },

    "minimum-stability": "stable",

    "require": {

        "php": ">=5.4.0",

        "yiisoft/yii2": "*",

        "yiisoft/yii2-bootstrap": "*",

        "yiisoft/yii2-swiftmailer": "*",

        "2amigos/yii2-date-picker-widget": "*",

        "yiisoft/yii2-jui": "*",

        "kartik-v/yii2-widget-select2": "*",

        "kartik-v/yii2-mpdf": "*",

        "2amigos/yii2-highcharts-widget": "*",

        "kartik-v/yii2-grid": "*",

        "kartik-v/yii2-datecontrol": "dev-master",

        "kartik-v/yii2-editable": "dev-master",

        "kartik-v/yii2-widget-datepicker": "*",

        "letyii/yii2-tinymce": "dev-master",

        "kartik-v/yii2-widget-datetimepicker": "*",

        "2amigos/yii2-ckeditor-widget": "*"

    },

    "require-dev": {

        "yiisoft/yii2-codeception": "*",

        "yiisoft/yii2-debug": "*",

        "yiisoft/yii2-gii": "*",

        "yiisoft/yii2-faker": "*"

    },

    "config": {

        "process-timeout": 1800

    },

    "extra": {

        "asset-installer-paths": {

            "npm-asset-library": "vendor/npm",

            "bower-asset-library": "vendor/bower"

        }

    }

}



Solved using the composer global require "fxp/composer-asset-plugin:1.0.0" command, thanks!