bug: Failed to find the bower component
Type: bug
Platform: all
I am trying to add push notification in my ionic project. When I try to add ionic dependencies I am getting an error as below
Failed to find the bower component "ionic-platform-web-client". Are you sure it exists? (CLI v1.6.5)
Your system information:
Cordova CLI: 5.2.0
Gulp version: CLI version 3.9.0
Gulp local:
Ionic Version: 1.1.0
Ionic CLI Version: 1.6.5
Ionic App Lib Version: 0.3.9
OS: Distributor ID: CentOS Description: CentOS release 5.3 (Final)
Node Version: v0.12.7
I also have updated IONIC CLI to 1.6.5
Kindly help me with this issue.
@leob solution to install git solved it for me. Thanks!
@laviathor yes but for me the web client library itself caused problems, it interfered with Firebase, that's why I don't use it (even though I do use Ionic Push)
@hongyongwhy 's method solved the issue for me:
1.Removed bower.json from the project folder
2.bower install ionic-platform-web-client
3.ionic add ionic-platform-web-client
This is actually a really easy fix, worked like a charm, only happens if you're root or if you're running as sudo
just add --allow-root
$ bower install ionic-platform-web-client --allow-root
Should work, then rerun
$ ionic add ionic-platform-web-client
I have tried everything from this forum, but still fail to add ionic-platform-web-client. Here is the error.
bower not-cached git://github.com/driftyco/ionic-bower.git#1.2.4 bower resolve git://github.com/driftyco/ionic-bower.git#1.2.4 bower not-cached git://github.com/driftyco/ionic-platform-web-client.git#* bower resolve git://github.com/driftyco/ionic-platform-web-client.git#* bower ECMDERR Failed to execute "git ls-remote --tags --heads git://github .com/driftyco/ionic-platform-web-client.git", exit code of #128 fatal: unable to connect to github.com: github.com[0: 192.30.252.128]: errno=No error
Additional error details: fatal: unable to connect to github.com: github.com[0: 192.30.252.128]: errno=No error
@limcheepei are you connected to the Internet? That error points to your machine not having internet access.
Is bower required in ionic 2?
Nope, ionic 2 does not use bower :smile:
@mhartington i am getting the same issue http://192.168.1.2:8100/lib/ionic-platform-web-client/dist/ionic.io.bundle.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
i used these yokeshs-Mac-mini:myapp yokesh$ ionic add ionic-platform-web-client
Failed to find the bower component "ionic-platform-web-client". Are you sure it exists? (CLI v2.0.0-beta.22)
Your system information:
Cordova CLI: Not installed Ionic CLI Version: 2.0.0-beta.22 Ionic App Lib Version: 2.0.0-beta.12 ios-deploy version: Not installed ios-sim version: Not installed OS: Mac OS X El Capitan Node Version: v4.4.2 Xcode version: Not installed
my bower version is yokeshs-Mac-mini:myapp yokesh$ sudo bower -v Password: 1.7.9
sudo apt-get install git npm sudo npm install -g bower ionic cordova ............ ionic add ionic-platform-web-client
On OSX El Capitan I have run:
> sudo ionic start appname blank
> sudo npm install -g bower
> sudo ionic add ionic-platform-web-client <-- fails as above
I've tried removing and init-ing bower.json and have gone through the other suggestions made in this thread to no avail. In the end I used:
> sudo bower install --save-dev ionic-platform-web-client --allow-root
This worked but subsequently
> sudo ionic add ionic-platform-web-client
still fails.
The app and environment does appear to be working as expected so far though.
Unfortunately, the ionic cli doesn't bubble up the error it receives from bower. Here is another possible solution after doing some debugging:
If running bower install --save-dev ionic-platform-web-client prompts you to choose a version of a dependent library, you must prefix your choice with !.
For example:
Unable to find a suitable version for ionic-platform-web-client, please choose one:
1) ionic-platform-web-client#^0.5.1 which resolved to 0.5.1 and is required by HelloIonic
2) ionic-platform-web-client#^0.7.1 which resolved to 0.7.1
Prefix the choice with ! to persist it to bower.json
? Answer 2!
bower ionic-platform-web-client resolution Saved ionic-platform-web-client#^0.7.1 as resolution
ionic add receives this prompt and fails with a generic error.
Simple use the command ionic start myapp [template]
I am getting error after entering following command "ionic add ionic-platform-web-client"
Error displayed-
Bower error, check that "ionic-platform-web-client" exisits, or try running "bower install --save-dev ionic-platform-web-client" for more info
(CL! v1.7.16)
For me the command was failing because my machine is behind a proxy. Adding my proxy details in ~/.bowerrc made the command work properly.
I tried to follow all your advice, but for me nothing works. Have you any suggestions?
I tried to follow all your advice, but for me nothing works. Have you any suggestions? I'am sorry it did not work for you. What error are you getting?