Important note about Bower and the asset plugin

Bower has changed their registry URL some time ago and has now announced to deprecate the old URL. Old registry will be disabled next Wednesday. In order for your work not to be affected make sure to update your composer asset plugin to the latest version:

composer global require "fxp/composer-asset-plugin:^1.4.2"

Versions prior to 1.4.2 use the https://bower.herokuapp.com/packages URL for fetching bower packages, which currently redirects to https://registry.bower.io/packages. This URL will be disabled on Wednesday, October 26, 2017 according to the Bower announcement so asset plugin versions prior to 1.4.2 will not be able to fetch any packages.

There is also a news announcement about this.

http://www.yiiframework.com/news/148/important-note-about-bower-and-the-asset-plugin/

I had the first bower issues couple of weeks ago.

Yii2-pjax failed install by way of composer.

I had to use bower to install it and the commands are below:



cd /var/www/<basic_web_app>


bower init


bower install yii2-pjax --save





#optional


bower install jquery-pjax  --save


bower install bootstrap  --save


bower install jquery  --save





It is ironic, because Bower keeps nagging us to ditch it and start using Yarn & Webpack.

Why can’t things stay simple ? :)

I know its planned for 2.1 but bower is ending support even bower itself recommends moving to npm or yarn.

No, Bower is still maintained. Yes, it advocates people to migrate, but that doesn’t mean that it’s EOL.

For javascript, yes: yarn/npm would be a good route to go. For everyone else: definitely not.