Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yii2 | requires bower-asset/jquery

I'm trying to install Yii2 via composer:

composer global require "fxp/composer-asset-plugin:~1.1.1"
composer create-project --prefer-dist yiisoft/yii2-app-basic basic

~/.composer/composer.json

{
    "require": {
    "fxp/composer-asset-plugin": "~1.1.1"
    }
}

result:

Problem 1
- yiisoft/yii2 2.0.x-dev requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 dev-master requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.5 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- Installation request for yiisoft/yii2 >=2.0.5 -> satisfiable by yiisoft/yii2[2.0.5, 2.0.6, dev-master, 2.0.x-dev].

What do I do wrong?

like image 699
Atanov Vladimir Avatar asked Jan 23 '16 14:01

Atanov Vladimir


1 Answers

rm -rf ~/.composer/vendor
rm ~/.composer/composer.lock
cd ~/.composer
composer clear-cache
composer self-update
composer global require "fxp/composer-asset-plugin:^1.1.3"
composer install

Then go to your work directory and run:

composer create-project --prefer-dist yiisoft/yii2-app-basic basic

like image 76
aderushev Avatar answered Dec 25 '22 12:12

aderushev