bower install lib in different folders in different computers - bower

I'm trying to install x2js with bower, doing the following:
$ bower install x2js
In my computer when I do the bower install, I'm getting:
$ bower install x2js
bower x2js#~1.1.7 not-cached git://github.com/abdmob/x2js.git#~1.1.7
bower x2js#~1.1.7 resolve git://github.com/abdmob/x2js.git#~1.1.7
bower x2js#* not-cached git://github.com/abdmob/x2js.git#*
bower x2js#* resolve git://github.com/abdmob/x2js.git#*
bower x2js#~1.1.7 download https://github.com/abdmob/x2js/archive/v1.1.7.tar.gz
bower x2js#* download https://github.com/abdmob/x2js/archive/v1.1.7.tar.gz
bower x2js#~1.1.7 extract archive.tar.gz
bower x2js#* extract archive.tar.gz
bower x2js#~1.1.7 mismatch Version declared in the json (1.1.5) is different than the resolved one (1.1.7)
bower x2js#~1.1.7 resolved git://github.com/abdmob/x2js.git#1.1.7
bower x2js#* mismatch Version declared in the json (1.1.5) is different than the resolved one (1.1.7)
bower x2js#* resolved git://github.com/abdmob/x2js.git#1.1.7
bower x2js#~1.1.7 install x2js#1.1.7
x2js#1.1.7 public/lib/x2js
While in other computer:
$ bower install x2js
bower x2js#* not-cached git://github.com/abdmob/x2js.git#*
bower x2js#* resolve git://github.com/abdmob/x2js.git#*
bower x2js#* download https://github.com/abdmob/x2js/archive/v1.1.7.tar.gz
bower x2js#* extract archive.tar.gz
bower x2js#* mismatch Version declared in the json (1.1.5) is different than the resolved one (1.1.7)
bower x2js#* resolved git://github.com/abdmob/x2js.git#1.1.7
bower abdmob/x2js#~1.1.7 install abdmob/x2js#1.1.7
abdmob/x2js#1.1.7 public/lib/abdmob/x2js
In in my computer creates x2js folder, while in other computer is creating abdmob/x2js folders.
Both computers are using the same version of bower ( 1.6.5 ).
why is happening this ?

Related

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

bamboo build fails on bower install

I am new to CI/bamboo and am trying to run a bamboo build job for a mean stack app (angular full-stack generator). I'm running bower via a bamboo script task.
Initially I used the command:
bower install
But this gave me an error message saying that the bower.json file is missing (sorry I don't have exact error message text on-hand). The bower file is definitely in the root of the project.
Next I changed the command to:
bower install bower.json
I believe this tells bower to use bower.json file in the project root.
This successfully kicks off the bower install, but it fails and in turn fails the bamboo build job. The following appears in the log:
07-Jan-2016 14:52:52 bower polymer#~0.5.4 invalid-meta polymer is missing "main" entry in bower.json
07-Jan-2016 14:52:52 bower polymer#~0.5.4 invalid-meta polymer is missing "ignore" entry in bower.json
07-Jan-2016 14:52:52 bower polymer#~0.5.4 resolved https://github.com/Polymer/polymer.git#0.5.6
07-Jan-2016 14:52:52 bower webcomponentsjs#^0.6.0 not-cached https://github.com/Polymer/webcomponentsjs.git#^0.6.0
07-Jan-2016 14:52:52 bower webcomponentsjs#^0.6.0 resolve https://github.com/Polymer/webcomponentsjs.git#^0.6.0
07-Jan-2016 14:52:52 bower core-component-page#^0.5 not-cached https://github.com/Polymer/core-component-page.git#^0.5
07-Jan-2016 14:52:52 bower core-component-page#^0.5 resolve https://github.com/Polymer/core-component-page.git#^0.5
07-Jan-2016 14:52:52 bower webcomponentsjs#^0.6.0 download https://github.com/Polymer/webcomponentsjs/archive/v0.6.3.tar.gz
07-Jan-2016 14:52:53 bower webcomponentsjs#~0.5.4 extract archive.tar.gz
07-Jan-2016 14:52:53 bower webcomponentsjs#~0.5.4 resolved https://github.com/Polymer/webcomponentsjs.git#0.5.5
07-Jan-2016 14:52:53 bower core-component-page#^0.5 download https://github.com/Polymer/core-component-page/archive/0.5.6.tar.gz
07-Jan-2016 14:52:56 bower core-component-page#^0.5 extract archive.tar.gz
07-Jan-2016 14:52:56 bower webcomponentsjs#^0.6.0 extract archive.tar.gz
07-Jan-2016 14:52:56 bower core-component-page#^0.5 invalid-meta core-component-page is missing "main" entry in bower.json
07-Jan-2016 14:52:56 bower core-component-page#^0.5 invalid-meta core-component-page is missing "ignore" entry in bower.json
07-Jan-2016 14:52:56 bower core-component-page#^0.5 resolved https://github.com/Polymer/core-component-page.git#0.5.6
07-Jan-2016 14:52:56 bower webcomponentsjs#^0.6.0 mismatch Version declared in the json (0.6.1) is different than the resolved one (0.6.3)
07-Jan-2016 14:52:56 bower webcomponentsjs#^0.6.0 resolved https://github.com/Polymer/webcomponentsjs.git#0.6.3
07-Jan-2016 14:52:56 bower ECONFLICT Unable to find suitable version for webcomponentsjs
The server is Ubuntu (sorry don't have version) and bower is version 1.7.1
Here is the bower.json file:
bower.json:
{
"name": "my-app",
"version": "0.0.0",
"dependencies": {
"angular": ">=1.2.*",
"json3": "~3.3.1",
"es5-shim": "~3.0.1",
"bootstrap-sass-official": "~3.1.1",
"bootstrap": "~3.1.1",
"angular-resource": ">=1.2.*",
"angular-cookies": ">=1.2.*",
"angular-sanitize": ">=1.2.*",
"angular-route": ">=1.2.*",
"font-awesome": ">=4.1.0",
"lodash": "~2.4.1",
"select2": "~4.0.1"
},
"devDependencies": {
"angular-mocks": ">=1.2.*",
"angular-scenario": ">=1.2.*"
}
}
The project has a .bowerrc file:
.bowerrc:
{
"directory": "client/bower_components"
}
I tried to simulate the bower task on my home pc (Ubuntu Ubuntu 14.04.3 LTS and bower 1.7.1) by running 'bower install' and it runs without issue. But if I specify the bower.json file in the command 'bower install bower.json' I get prompted for the following:
Unable to find a suitable version for webcomponentsjs, please choose one:
1) webcomponentsjs#~0.5.4 which resolved to 0.5.5 and is required by App States#0.6.9
2) webcomponentsjs#* which resolved to 0.5.5 and is required by core-component-page#0.5.6
3) webcomponentsjs#^0.6.0 which resolved to 0.6.3 and is required by polymer#0.5.6
Not sure if this behavior is related to the bamboo issue.
Any ideas?
Specify the version for the conflicting webcomponentsjs explicitely in your bower.json. While bower can ask you which dependency to use when running from an interactive shell, this is obviously not possible when running the task on Bamboo.

'bower install angular-bootstrap' fails on OS X

I posted this question to the angular-bootstrap repo and was advised to talk to the bower folks...
Here's what happens when I try to use bower to install angular-bootstrap:
Charless-MacBook-Pro:orglines charlesames$ bower install angular-bootstrap
bower cached git://github.com/angular-ui/bootstrap-bower.git#0.12.0
bower validate 0.12.0 against git://github.com/angular-ui/bootstrap-bower.git#*
bower cached git://github.com/angular/bower-angular.git#1.2.28
bower validate 1.2.28 against git://github.com/angular/bower-angular.git#>=1 <1.3.0
bower not-cached git://github.com/angular/bower-angular.git#1.3.36
bower resolve git://github.com/angular/bower-angular.git#1.3.36
bower cached git://github.com/angular/bower-angular.git#1.3.12
bower validate 1.3.12 against git://github.com/angular/bower-angular.git#*
bower ENORESTARGET No tag found that was able to satisfy 1.3.36
Additional error details:
Available versions: 1.4.0-build.3818+sha.030a42e, 1.4.0-build.3817+sha.898714d,
[snip]
This is the only module I've tried that fails. Any ideas?

Bower hangs on checkout?

OK I'm trying use bower to install a package but to no avail
"bower install threejs"
Returns:
bower not-cached git://github.com/mrdoob/three.js.git#*
bower resolve git://github.com/mrdoob/three.js.git#*
bower checkout threejs#master
and it hangs there.. why??

Error on installing momentjs using bower

I'm trying to install momentjs using bower:
bower install -S momentjs
But I get the following error:
bower ngStorage#0.3.0 not-cached git://github.com/agrublev/ngStorage.git#0.3.0
bower ngStorage#0.3.0 resolve git://github.com/agrublev/ngStorage.git#0.3.0
bower momentjs#2.6.0 cached git://github.com/moment/moment.git#2.6.0
bower momentjs#2.6.0 validate 2.6.0 against git://github.com/moment/moment.git#2.6.0
bower momentjs#* cached git://github.com/moment/moment.git#2.6.0
bower momentjs#* validate 2.6.0 against git://github.com/moment/moment.git#*
bower ngStorage#0.3.0 ENORESTARGET No tag found that was able to satisfy 0.3.0
Additional error details:
Available versions: 0.1.7, 0.1.6, 0.1.5
It looks like there's some sort of mix up between different repositories named ngStorage.
bower search ngStorage
Gives:
Search results:
ngstorage git://github.com/gsklee/ngStorage.git
ngStorage git://github.com/agrublev/ngStorage.git
The #0.3.0 tag exists for gsklee/ngStorage, but not for agrublev/ngStorage. (I already have the gsklee package installed for my project.)
How can I can workaround or fix whatever it is that is giving the error when trying to install momentjs?
I managed to solve this by:
1) Removing the following line from bower.json:
"ngStorage": "0.3.0"
2) Installing momentjs using:
bower install -S momentjs
3) Reinstalling ngstorage using:
bower install -S ngstorage
I suspect the issue was that I had manually edited bower.json (hadn't used -S while installing) and had the wrong entry for the ngstorage dependency (it was nsStorage, but should have been ngstorage - case sensitive)

Resources