Bower install display prompt input message debian
Asked Answered
R

2

12

I am getting a problem trying to execute a bower install on my project

I am just executing bower install command on my debian OS but when this is recognizing the dependencies defined on my bower.json.

its got stuck in a part that I dont understand

this is the last part that i see in my command line

 "dependencies": {
          "angular": {
            "endpoint": {
              "name": "angular",
              "source": "angular",
              "target": "^1.0.8"
            },
            "canonicalDir": "/home/ricco/.cache/bower/packages/060a9fe0e60a0d3d6c9ed350cde03e61/1.5.4",
            "pkgMeta": {
              "name": "angular",
              "version": "1.5.4",
              "license": "MIT",
              "main": "./angular.js",
              "ignore": [],
              "dependencies": {},
              "homepage": "https://github.com/angular/bower-angular",
              "_release": "1.5.4",
              "_resolution": {
                "type": "version",
                "tag": "v1.5.4",
                "commit": "b972d5aa130bef5c4d931f22bd11627207ea35ca"
              },
              "_source": "https://github.com/angular/bower-angular.git",
              "_target": ">=1"
            },
            "dependencies": {},
            "nrDependants": 1
          }
        },
        "nrDependants": 1
       }
     ]
    }
   ]
  }
}, {
  "type": "input",
  "message": "Answer",
  "name": "prompt",
  "level": "prompt"

then there after dislpaying the

{
  "type": "input",
  "message": "Answer",
  "name": "prompt",
  "level": "prompt"

it got stuck there for some reason.

This is my bower.json

{
  "name": "ng-boilerplate",
  "version": "0.3.2",
  "devDependencies": {
    "angular": "~1.2",
    "angular-mocks": "~1.2",
    "bootstrap": "~3.1",
    "angular-bootstrap": "~0.10.0",
    "angular-ui-router": "~0.2",
    "angular-route":"1.5.3",
    "angular-resource":"1.5.3"
  },
  "dependencies": {}
}
Repairman answered 17/4, 2016 at 17:28 Comment(0)
W
45

I experienced the same issue using the Angular boilerplate ngbp.

I solved the issue by removing the following line from my .bowerrc file:

"json": "bower.json"


Alternatively, see the answer below by @NikolaB. which involves adding resolutions to your bower.json instead of removing this line.

Wilke answered 29/4, 2016 at 13:41 Comment(5)
even without using ngbp, this seems to work on CentOS as wellMerritt
Yep, works. This seems a little random - anything in particular that led you to this?Bestiary
Nothing in particular, I believe I found the solution by reading through some GitHub issues for an unrelated project and some good ol' trial and error.Wilke
@Wilke check out my answer, maybe it could help you fix the issue without removing anything from .bowerrc fileGuideline
@NikolaB. I added a reference to your solution :)Wilke
G
1

When you specify dependencies for your app via Bower, some of the packages might rely on different versions of the same library. You will have to resolve what version of libraries you want in your app.

If you configure you Bower using "json": "bower.json" inside .bowerrc file, Bower will expect those resolutions to be inside bower.json file. This means that you must have "resolutions" property inside bower.json file.

So, you could try adding "resolutions" property into your bower.json:

{
  "name": "ng-boilerplate",
  "version": "0.3.2",
  "devDependencies": {
    "angular": "~1.2",
    "angular-mocks": "~1.2",
    "bootstrap": "~3.1",
    "angular-bootstrap": "~0.10.0",
    "angular-ui-router": "~0.2",
    "angular-route":"1.5.3",
    "angular-resource":"1.5.3"
  },
  "resolutions": {
    "angular": "1.2.12"
  }
}
Guideline answered 12/6, 2017 at 13:57 Comment(2)
Thanks for providing some explanation of the cause. I had a look around and I couldn't find any documentation supporting this. Do you know if it is documented anywhere?Wilke
@Wilke You can find it in bower specification - github.com/bower/spec/blob/master/json.md "resolutions (Type: Object) - Dependency versions to automatically resolve with if conflicts occur between packages."Guideline

© 2022 - 2024 — McMap. All rights reserved.