yii2: The file or directory to be published does not exist: `bower/jquery/dist`
I suddenly got this error few hours ago.
The file or directory to be published does not exist: `bower/jquery/dist`
Turns out the there is one more level under directory vendor/bower
,
$ ls vendor/bower
bower-asset
$ ls vendor/bower/bower-asset
ace-builds bootstrap handlebars jquery-slimscroll magnific-popup seiyria-bootstrap-slider zeroclipboard
angular bootstrap-hover-dropdown jquery jquery.sparkline.build moment slick-carousel
while in
https://github.com/yiisoft/yii2/blob/master/framework/base/Application.php#L456
Yii::setAlias('@bower', $this->_vendorPath . DIRECTORY_SEPARATOR . 'bower');
I’m using "fxp/composer-asset-plugin:~1.0.3"
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 1
- Comments: 20 (9 by maintainers)
Commits related to this issue
- Fix removal of packages installed in custom path with custom installers not overriding uninstall, fixes #2232 — committed to composer/composer by Seldaek 9 years ago
I had the same issue when I updated to the latest
composer.json
. The solution: update theconfig/web.php
too. Addto
$config
. Like in theconfig/web.php
onmaster
now.Just rename the folder “bower-asset” to “bower” in /vender directory. And make sure the directory “bower-asset” has all of its content
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" }
2020 - this issue still seems to exist and bother me;)
Still facing the issue with latest composer version 1.5.2 2017
@samdark’s solution is working
thanks!
This worked for me.
Still getting this error in 2020 😦
make sure you have the latest version of the composer-asset-plugin and the config in composer.json:
https://github.com/yiisoft/yii2-app-basic/blob/0c87fab0c3c9d0ada04a85f4982aeffc08b76cc7/composer.json#L33
Please read README.md of this https://packagist.org/packages/yidas/yii2-bower-asset