SteB
SteB

Reputation: 2007

Bower not updating or installing

I've been trying to update moment.js (& several other plugins) using Bower, updating moment from 2.8.4 to 2.9.

I changed my bower.json file to be "moment": "2.x" (was ~2.8.3, I also tried ~2.8, then 2.x) & bower says it's cached and validated but running bower list shows 2.8.4 is still installed.

Whenever I try an update or install it goes through all my dependencies.

I then uninstalled moment (which worked), but now bower won't install it, bower list gives moment not installed.

I'm running the latest Bower 1.4.0.

My bower.json:

{
  "name": "intranet",
  "version": "1.12.35",
  "authors": [
    "SteB"
  ],
  "license": "proprietary",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "jquery": "~2.1",
    "jquery-migrate": "~1.2",
    "modernizr": "~2.8.3",
    "moment": "2.x",
    "respond": "~1.4.2",
    "jquery-ui": "~1.11",
    "chartjs": "~1.0.2",
    "rickshaw": "~1.5.1",
    "gmaps": "~0.4.14",
    "d3": "~3.4.11",
    "bootstrap-modal": "~2.2.5",
    "kbwood_countdown": "~2.0.1",
    "bootstrap": "2.3.2",
    "footable": "2.0.1.5",
    "bootstrap-maxlength": "~1.5.7",
    "flot": "~0.8.3",
    "jqplot": "*",
    "scrollup": "2.4.*",
    "fullcalendar": "1.6.4",
    "bootstrap-switch": "~2.0.5",
    "es5-shim": "~4.1",
    "chosen": "~1.2",
    "platform": "~1.3",
    "fontawesome": "~4.2.0",
    "jquery.steps": "~1.1",
    "jquery-cookie": "~1.4",
    "typeahead.js": "~0.10.5",
    "ladda": "~0.9.7"
  },
  "devDependencies": {},
  "resolutions": {
    "bootstrap": "2.3.2",
    "jquery": "~2.1"
  }
}

Upvotes: 1

Views: 2165

Answers (1)

nitin
nitin

Reputation: 3787

  1. Delete yr previous "bower_components" folder or any other target installation location specified in ".bowerrc"
  2. Use below bower.json (null to get latest version)
  3. Run "bower install"

    {
     "name": "intranet",
      "version": "1.12.35",
      "authors": [
                  "SteB"
                 ],
      "ignore": [
                 "**/.*",
                 "node_modules",
                 "bower_components",
                 "test",
                 "tests"
                ],
       "license": "proprietary",
       "dependencies" : {
                         "jquery": null,
                         "jquery-migrate": null,
                         "modernizr": null,
                         "moment": null,
                         "respond": null,
                         "jquery-ui": null
                       }
     }
    

Above will do fine. You need to check yr rest dependencies on bower bcz there naming seems to be incorrect

Upvotes: 1

Related Questions