1

I am trying to install angular 1.4.5 using bower.json. This is how my bower.json file looks like

{
  "name": "asp.net",
  "private": true,
  "dependencies": {
    "angular": "1.4.5",
    "angular-resource": "1.4.5",
    "angular-route": "1.4.5",
    "bootstrap": "3.3.5"
  }
}

after saving, this file got changed to

{
  "name": "asp.net",
  "private": true,
  "dependencies": {
    "angular": "1.4.5",
    "angular-resource": "1.4.5",
    "angular-route": "1.4.5",
    "bootstrap": "3.3.5"
  },
  "resolutions": {
    "angular": "1.5.8-build.4928+sha.e8c2e11"
  }
}

and i guess because of this, angular is not installing, it says wrong version. check under Bower folder enter image description here

any assistance would be greatly appreciated.

Charitha Goonewardena
  • 4,418
  • 2
  • 36
  • 38

3 Answers3

2

use ~ sign in "angular": "~1.4.x"

 {
  "name": "asp.net",
  "private": true,
  "dependencies": {
    "angular": "~1.4.x",
    "angular-resource": "1.4.5",
    "angular-route": "1.4.5",
    "bootstrap": "3.3.5"
  }
}

for more information read this

Community
  • 1
  • 1
Durgpal Singh
  • 11,481
  • 4
  • 37
  • 49
1

https://github.com/angular/angular.js/issues

It will be better use this also. Add new issue and you will definitely find something. I never got this kind of problem anytime when I was installing or doing anything with AngularJS.

Thanks

1

Add below resolution and delete Bower folder.

"resolutions": {
    "angular": "1.4.5"
}

This will install v1.4.5 of angular

I hope this helps you

Cheers!

Varit J Patel
  • 3,497
  • 1
  • 13
  • 21