Closed petrabarus closed 8 years ago
To reproduce
$ git clone git@github.com:yiisoft/yii2-app-basic.git
$ composer update --prefer-dist
$ ls vendor/
autoload.php bin/ bower/ cebe/ composer/ ezyang/ fzaninotto/ phpspec/ swiftmailer/ yiisoft/
$ ls vendor/bower/
bower-asset
$ ls vendor/bower/bower-asset
bootstrap jquery jquery.inputmask punycode typeahead.js yii2-pjax
$sed -n '456'p vendor/yiisoft/yii2/base/Application.php
Yii::setAlias('@bower', $this->_vendorPath . DIRECTORY_SEPARATOR . 'bower');
The problem recently occurred and we are trying to figure out what happens.
Simple solution is by
Yii::setAlias('@bower', $this->_vendorPath . DIRECTORY_SEPARATOR . 'bower/bower-asset');
but I don't know what cause this.
composer self-update 1.0.0-alpha11
composer clear-cache
Then repeat.
@samdark's solution is working
composer self-update 1.0.0-alpha11
composer clear-cache
thanks!
This is now fixed and fxp plugin is tagged.
go to the directory C:\wamp64\www\yii2-advanced-api\vendor and change bower-asset into bower. this helped me
I've same problem in 2017 (CARL !). The solution is
"asset-installer-paths": { "npm-asset-library": "vendor/npm", "bower-asset-library": "vendor/bower" }
Just rename the folder "bower-asset" to "bower" in /vender directory. And make sure the directory "bower-asset" has all of its content
Still facing the issue with latest composer version 1.5.2 2017
make sure you have the latest version of the composer-asset-plugin and the config in composer.json:
I had the same issue when I updated to the latest composer.json
.
The solution: update the config/web.php
too. Add
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
to $config
. Like in the config/web.php
on master
now.
Hey there i am still facing this issue. i tried: 1). 'aliases' => [ '@bower' => '@vendor/bower', '@npm' => '@vendor/npm-asset', ],
Need Help.
2020 - this issue still seems to exist and bother me;)
I had the same issue when I updated to the latest
composer.json
. The solution: update theconfig/web.php
too. Add'aliases' => [ '@bower' => '@vendor/bower-asset', '@npm' => '@vendor/npm-asset', ],
to
$config
. Like in theconfig/web.php
onmaster
now.
This worked for me.
Still getting this error in 2020 :(
Some packages, like kriss/yii2-calendar-schedule
has provide
key in composer.json
:
"provide": {
"bower-asset/jquery": "*",
"bower-asset/bootstrap": "*",
"bower-asset/inputmask": "*",
"bower-asset/jquery.inputmask": "*",
"bower-asset/punycode": "*",
"bower-asset/yii2-pjax": "*",
"npm-asset/fullcalendar": "*"
},
and this can affect the installation.
Please read README.md of this https://packagist.org/packages/yidas/yii2-bower-asset
I suddenly got this error few hours ago.
Turns out the there is one more level under directory
vendor/bower
,while in
https://github.com/yiisoft/yii2/blob/master/framework/base/Application.php#L456
I'm using
"fxp/composer-asset-plugin:~1.0.3"