Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install latest unstable AngularJS components using Bower?

I’ve scaffold an AngularJS app using Yeoman:

yo angular –minsafe

When I run “bower list” command I get following:

angular#1.0.8 (latest is 1.2.0-rc.2)
angular-mocks#1.0.8 (latest is 1.2.0-rc.2)
 -angular#1.0.8 (latest is 1.2.0-rc.2)
angular-scenario#1.0.8 (latest is 1.2.0-rc.2)
 -angular#1.0.8 (latest is 1.2.0-rc.2)
angular-scenario#1.0.8 (latest is 1.2.0-rc.2)
 -angular#1.0.8 (latest is 1.2.0-rc.2)
es5-shim#2.0.12(latest is 2.1.0)
json3#3.2.5

I would like to install the latest unstable versions of angular and it’s dependencies.

My bower version is 1.2.6.

What I tried to do was replacing the versions of components in bower.json:

{
 "name": "testapp",
 "version": "0.0.0",
 "dependencies": {
   "angular": "1.2.0.-rc.2",
   "json3": "~3.2.4",
   "es5-shim": "~2.0.8"
 },
  "devDependencies": {
    "angular-mocks": "1.2.0.-rc.2",
    "angular-scenario": "1.2.0.-rc.2"
  }
}

And running the following command:

bower update angular –force-latest

That gave me the following error:

bower ENORESTARGET Tag/branch 1.2.0.-rc.2 does not exist

Also I’ve tried to delete the bower_components folder, cleaning the cache using “bower cache clean” and then “bower install”. But I got the same ENORESTARGET error.

What am I doing wrong?

like image 557
Havrl Avatar asked Sep 17 '13 09:09

Havrl


Video Answer


1 Answers

You have error in angular version. It should be 1.2.0-rc.2 instead of 1.2.0.-rc.2 (see the extra dot after 0?)

bower install angular#1.2.0-rc.2

like image 199
jusio Avatar answered Sep 28 '22 17:09

jusio