Can I get bower to install packages when there's a version mismatch? - bower

When I upgrade a version in bower.json from say 2.8.1 to 2.8.2 and run bower install it doesn't actually install the new version. I can run bower install -f but that re-installs all packges.
Can I make bower install only when necesary?

https://bower.io/docs/api/#update
So this could help:
bower update --save <package-name>

Related

Bower packages don't install

I am trying to install bower packages, in the site of bower is written I must install them following way:
bower install <package>
But it doesn't want to install this kinda way. Instead,it tells me something like:
ENOGIT git is not installed or not in the PATH
How to deal with this kinda problem?
Thank you.
you have to install git, some package in bower depend on git to be installed

bower install just says cached validate, but doesn't install

I am trying to install progressbar.js into my rails app.
I run bower install progressbar.js
And the terminal puts out:
bower progressbar.js#* cached https://github.com/kimmobrunfeldt/progressbar.js.git#1.0.1
bower progressbar.js#* validate 1.0.1 against https://github.com/kimmobrunfeldt/progressbar.js.git#*
The files are not put into the app. When I run bower list, it has:
progressbar.js#1.0.1 extraneous
How do I install this? Other times I run bower install, it has worked no problem.

How to install Angular2 beta with Bower?

I'm trying to install Angular2 with Bower with command bower install -S angular2 and have next messages in console:
$ bower install -S angular2
bower angular2#* cached git://github.com/angular/bower-angular.git#1.4.8
bower angular2#* validate 1.4.8 against git://github.com/angular/bower-angular.git#*
bower angular#~1.4.8 install angular#1.4.8
angular#1.4.8 bower_components/angular
My bower.json file now contains next info in dependencies section:
"dependencies": {
"angular": "angular2#~1.4.8"
}
And I have Angular 1.4.8 after that in bower_components path.
So, how to install Angular2 beta with Bower?
I have installed it from github with the command bower install git#github.com:angular/angular.git:
$ bower install git#github.com:angular/angular.git
bower angular#* not-cached git#github.com:angular/angular.git#*
bower angular#* resolve git#github.com:angular/angular.git#*
bower angular#* checkout 2.0.0-build.ffbcb26.js
bower angular#* invalid-meta angular is missing "main" entry in bower.json
bower angular#* invalid-meta angular is missing "ignore" entry in bower.json
bower angular#* resolved git#github.com:angular/angular.git#2.0.0-build.ffbcb26.js
bower angular#~2.0.0-build.ffbcb26.js install angular#2.0.0-build.ffbcb26.js
angular#2.0.0-build.ffbcb26.js bower_components/angular
I advise you not to use Bower. Bower is used to get your packages in your project folder, that's it.
Try to look up JSPM (http://jspm.io). It does a lot more than getting packages in your project. It takes care of ES6 to ES5. And loads all your packages in one time using SystemJS in your browser with just a couple lines of code.
you can install jspm using npm:
npm init
npm install (-g) jspm // -g only if you want jspm globally installed
jspm init
This worked for me, for Angular 2 bower install angular2-build

How to uninstall a bower package using gitbash?

I want to uninstall my - time picker which is - "bootstrap-timepicker": "~0.3.0" (in bower.json) and I guess its overlapping - "bootstrap-ui-datetime-picker": "~1.2.1", which I need.
I tired the uninstall command and it just did the following:
$ bower uninstall bootstrap-timepicker
bower uninstall bootstrap-timepicker
bower uninstall autotype
So how can I really uninstall and remove dependency from bower.json?
$ bower uninstall bootstrap-timepicker --save
http://bower.io/docs/api/#uninstall

Bower install not latest version

I have package bootstrap-calendar
In bower.json it is version 0.2.0-RC and I even updated it to 0.2.0. But no matter what when you run
$> bower install bootstrap-calendar
it attempts to install version 0.0.9 which is earliest version. I cleaned cache but no success. What can I do that on bower install command latest package would be installed?
I don't think this is anything you are doing incorrectly. The package installs for me as 0.0.9 and the js file is listed as 0.1. I think the package is just not correct and needs to be mentioned on the issues section of Github, which I did.

Resources