ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: Failed to find the bower component

Open vaibhav5923 opened this issue 11 years ago • 57 comments

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.

vaibhav5923 avatar Oct 05 '15 06:10 vaibhav5923

@leob solution to install git solved it for me. Thanks!

aatifhshah avatar Mar 05 '16 18:03 aatifhshah

@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)

leob avatar Mar 06 '16 03:03 leob

@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

jithujoseph avatar Mar 20 '16 22:03 jithujoseph

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

ecommerce-technician avatar Mar 22 '16 23:03 ecommerce-technician

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 avatar Mar 23 '16 10:03 limcheepei

@limcheepei are you connected to the Internet? That error points to your machine not having internet access.

jgw96 avatar Mar 23 '16 14:03 jgw96

Is bower required in ionic 2?

warnerpinz avatar Mar 27 '16 02:03 warnerpinz

Nope, ionic 2 does not use bower :smile:

mhartington avatar Mar 27 '16 11:03 mhartington

@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

yokeshvaradhan avatar Apr 07 '16 14:04 yokeshvaradhan

sudo apt-get install git npm sudo npm install -g bower ionic cordova ............ ionic add ionic-platform-web-client

vuhung3990 avatar Apr 08 '16 07:04 vuhung3990

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.

leydar avatar Apr 13 '16 14:04 leydar

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.

redeemedfadi avatar Apr 20 '16 13:04 redeemedfadi

Simple use the command ionic start myapp [template]

forvela avatar Apr 24 '16 18:04 forvela

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)

cracker111 avatar Jul 01 '16 09:07 cracker111

For me the command was failing because my machine is behind a proxy. Adding my proxy details in ~/.bowerrc made the command work properly.

ruslan-kurkebayev avatar Jul 15 '16 09:07 ruslan-kurkebayev

I tried to follow all your advice, but for me nothing works. Have you any suggestions?

fedepasi avatar Jul 21 '16 10:07 fedepasi

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?

ruslan-kurkebayev avatar Jul 27 '16 13:07 ruslan-kurkebayev