Ionic-framework: bug: Failed to find the bower component

Created on 5 Oct 2015  路  57Comments  路  Source: ionic-team/ionic-framework

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.

Most helpful comment

Same here:

Failed to find the bower component "ionic-platform-web-client".
Are you sure it exists? (CLI v1.7.0)

Your system information:

Cordova CLI: 5.1.1
Gulp version:  CLI version 3.8.11
Gulp local:   Local version 3.9.0
Ionic Version: 1.1.0
Ionic CLI Version: 1.7.0
Ionic App Lib Version: 0.5.1-beta.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v0.12.2
Xcode version: Not installed

With bower install --save-dev ionic-platform-web-client I could install it.

All 57 comments

What command did you enter to get this? How could I go about recreating this?
I did try this with ionic add ionic-platform-web-client and everything worked correctly.

I am trying to fire below command-

ionic add ionic-platform-web-client

What version of bower do you have?

bower 1.5.3

Could you run

bower install --save-dev ionic-platform-web-client

This should output some more error information for us.

For this command I got this error

bower ESUDO Cannot be run with sudo
Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814

You can however run a command with sudo using --allow-root option

Okay, it's a permissions issue. Did you use sudo to create the project at anytime?

I also installed -allow-root option of bower

& have also tried with sudo bower but still same error it is trhowing

No you shouldn't have to use sudo ever after installing bower & ionic

Let's try this, let's make a blank test project

ionic start myTest blank && cd myTest
ionic add ionic-platform-web-client

Don't use sudo in any of that and let me know if it works fine.

Still getting same Error after firing command
ionic add ionic-platform-web-client

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

is like @mhartington tell
on windows start CMD as administrator

Just add GIT. It will work fine. :)
I have added GIT by
sudo apt-get install git-core
then run the command
ionic add ionic-platform-web-client.

No errors!

Same here:

Failed to find the bower component "ionic-platform-web-client".
Are you sure it exists? (CLI v1.7.0)

Your system information:

Cordova CLI: 5.1.1
Gulp version:  CLI version 3.8.11
Gulp local:   Local version 3.9.0
Ionic Version: 1.1.0
Ionic CLI Version: 1.7.0
Ionic App Lib Version: 0.5.1-beta.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v0.12.2
Xcode version: Not installed

With bower install --save-dev ionic-platform-web-client I could install it.

Im also getting this error on one of my computer..
how to resolve this?

This also happened to me. What I did is to check the bower.json file. See if ionic-platform-web-client is listed under the devDependencies. If it's there, check the latest version and update the line correspondingly. You might have the dependency added already and re-running the command will install the latest version.

If it's already there, just bower update (after updating to the latest version, to date: "ionic-platform-web-client": "~0.2.1",).

I recently updated X-Code and needed to agree to the new terms in X-Code before this would work. Simply opening x-code and agreeing fixed the issue for me.

To those who encounter this error, this is how I solved it.

I removed the bower.json from my local folder, and re-initialized it with bower init. Everything went smoothly from then onwards.

I tried everything but also getting this error "filed to find bower component" how to resolved it...

I've the same error. No solution works for me.

Failed to find the bower component "ionic-platform-web-client".
Are you sure it exists? (CLI v1.7.7)

Your system information:

Component | Version
Cordova CLI | 5.3.3
Gulp Version | CLI version 3.9.0
Gulp local |
Ionic CLI Version | 1.7.7
Ionic App Lib Version | 0.6.3
OS | Windows 8.1
Node Version | v0.12.2

This command solved my problem

bower install --save-dev ionic-platform-web-client

I've the same error. No solution works for me.

The commando "bower install --save-dev ionic-platform-web-client" gives me the following:

bower ionic#1.1.0 not-cached git://github.com/driftyco/ionic-bower.git#1.1.0
bower ionic#1.1.0 resolve git://github.com/driftyco/ionic-bower.git#1.1.0
bower ionic#1.1.0 download https://github.com/driftyco/ionic-bower/archive/v1.1.0.tar.gz
bower ionic#1.1.0 extract archive.tar.gz
bower ionic#1.1.0 invalid-meta ionic is missing "ignore" entry in bower.json
bower ionic#1.1.0 resolved git://github.com/driftyco/ionic-bower.git#1.1.0
bower ENOTFOUND Package ionic-platform-web-clien not found

Same error here. But I think I know what's the issue and solution.

I re-init bower, installed ionic-platform-web-client but still same error message. It seems like there is a problem with ionic add clitask. (/lib/ionic/add.js) at line 17 when its trying to install bower component. it require sudo access with --allow-root option as follows:
* var bowerInstallCommand = 'sudo bower install --save-dev --allow-root ' + componentName; *

should I create a pull request if this is appropriate way to fix this issue?

can you show your bower.json file? here's what I have:

{
  "name": "AppName Here",
  "private": "true",
  "devDependencies": {
    "ionic": "driftyco/ionic-bower#master",
    "ionic-service-core": "~0.1.7",
    "ionic-service-push": "~0.1.8",
    "ngCordova": "~0.1.17-alpha",
    "platform": "~1.3.0",
    "ionic-platform-web-client": "~0.2.1"
  }
}

this error occured to me when I already have the ionic-platform-web-client in the file. all i did is to update it to the latest version and do a bower update

@jcuervo , I think issue is not about bower.json, the add command suppose to be adding all dependencies into your bower.json. All I found was add task needed admin privilege, that's it. If you are on unbuntu, try what i did if that fix the issue.

ah! sorry, mate! i'm on Mac and got my issue resolved already.
better tag the owners if your solution resolves this ticket.

I had the same problem on linux, the solution was.

su -c 'npm install -g bower'

For me sudo npm install -g bower fixed it.

Luobot...that worked!!! Thanks!

Just a note for anyone else with this error message: if you're using a network that has certain connections blocked, you may also see this error. My primary work network blocks access to Github, which threw this exact error. After moving to a more open connection, it's all good.

After i update bower this issue solved npm install -g bower

@hongyongwhy solved with his method and starting cmd as admin:
1.Remove bower.json from the project folder
2.bower install ionic-platform-web-client
3.ionic add ionic-platform-web-client

I had the same error message, for me the cause was simply that I didn't have bower installed. After installing bower ("npm install -g bower") it worked fine.

I had to install git. Closed and opened windows command prompt and tried this again :

ionic add ionic-platform-web-client

It worked.

The answer provided by @hanamj resolved my issue. As soon as I read through it I had the 'ah ha' moment and remembered that the network here at the office doesn't play nice with Github.

Yes Git was the answer. thanks.

I couldn't solve it yet.

I could solve it just removing old one commited at: www/lib/ionic-platform-web-client
and after calling: ionic add ionic-platform-web-client

I have it working for one Ionic Project but not the next - I tried many of the comments here.
removing bower.json and bower init
npm install -g bower
set PATH=%PATH%;C:\Program Files\Git\bin

Nothing seems to work ... help...

Well I "solved" it by not using the web client library at all. I found out that:

  • it interferes with proper operation of Firebase in my app (as soon as I include the web client library I get dropped/failing Firebase connections)
  • Surprisingly, I found out that I don't really need the web client lib, at least I was able to use Ionic Push without the library (to send push messages you use a simple REST call via Angular $http)

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

Was this page helpful?
0 / 5 - 0 ratings