1

In my application, all the packages except Chart and angular-chart are already installed.

I need to install only these two.

Question: How to skip the rest of the packages from being updated or downloaded again?

{
  "name": "ui-chromeapp",
  "version": "0.0.0",
  "dependencies": {
    "angular": "~1.2.23",
    "angular-bootstrap": "~0.11.0",
    "bootstrap": "~3.2.0",
    "angular-ui-router": "~0.2.11",
    "underscore": "~1.7.0",
    "jquery.easy-pie-chart": "~2.1.4",
    "sprintf": "~1.0.2",
    "jquery.scrollTo":"~2.1.1",
    "angular-translate":"~2.8.1",
    "angular-translate-loader-static-files" : "~2.8.1",
    "Chart.js" : "1.0.1"

  },
  "devDependencies": {},
  "resolutions": {
    "Chart.js": "1.0.1"
  }
}
Yogesh
  • 773
  • 1
  • 8
  • 22
  • 1
    While using `bower install` command no new packages / dependencies were installed. When using `bower update` new versions of your packages will be downloaded (depending on your bower.json configuration -> package version config). All in all, both commands do not install a package in the same package-version again. Whats your problem so? – lin Jun 08 '17 at 10:10
  • If you specify the ~ in front of the front of the version, in that case, it matches the 1.2.32 version. Reference: https://stackoverflow.com/questions/22343224/whats-the-difference-between-tilde-and-caret-in-package-json. I don't want to update angular to 1.2.32. Hence when I run bower install, it should not update angular or other libs but only chart. **Other option to handle this is to remove the ~ and ^ sign from all the entries in the bower.json**, but is there any proper way to circumvent this issue? – Yogesh Jun 09 '17 at 10:10
  • So why dont you aim an a specific version. Just remove `~` an `^` and you will be fine? – lin Jun 09 '17 at 10:30
  • Any feedback on my answer? – lin Jun 11 '17 at 10:34
  • I have handled in the same way but I was thinking if there exists any other way or not? Thanks – Yogesh Jun 12 '17 at 10:50
  • Check your questions here: https://stackoverflow.com/users/5465648/yogesh-sonawane?tab=questions =) Do you know how to mark a right answer? There is a "grey" tick near the upvote button on each answer. Just hit it =) – lin Jun 12 '17 at 11:05
  • Cheers m8 =) ! Please also check your other questions and mark right answers in the futures. You will also recive more help because some users will check your profile / mark rate before helping. =) – lin Jun 12 '17 at 11:27

1 Answers1

1

Hint: While using bower installcommand, after your ran it once before, no new packages / dependencies were installed. When using bower update new versions of your packages will be downloaded (depending on your bower.json configuration -> package version config). All in all, both commands do not install a package in the same package-version again.

Just remove the version option handlers and you wil be fine. It's not a issue, it's a nice behavior.

{
  "name": "ui-chromeapp",
  "version": "0.0.0",
  "dependencies": {
    "angular": "1.2.23",
    "angular-bootstrap": "0.11.0",
    "bootstrap": "3.2.0",
    "angular-ui-router": "0.2.11",
    "underscore": "1.7.0",
    "jquery.easy-pie-chart": "2.1.4",
    "sprintf": "1.0.2",
    "jquery.scrollTo":"2.1.1",
    "angular-translate":"2.8.1",
    "angular-translate-loader-static-files" : "2.8.1",
    "Chart.js" : "1.0.1"

  },
  "devDependencies": {},
  "resolutions": {
    "Chart.js": "1.0.1"
  }
}
lin
  • 17,956
  • 4
  • 59
  • 83