Bower install display prompt input message debian

人盡茶涼 提交于 2019-12-08 16:25:39

问题


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": {}
}

回答1:


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.




回答2:


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"
  }
}


来源:https://stackoverflow.com/questions/36679810/bower-install-display-prompt-input-message-debian

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!