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

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.

mhartington avatar Oct 05 '15 12:10 mhartington

I am trying to fire below command-

ionic add ionic-platform-web-client

vaibhav5923 avatar Oct 05 '15 12:10 vaibhav5923

What version of bower do you have?

mhartington avatar Oct 05 '15 12:10 mhartington

bower 1.5.3

vaibhav5923 avatar Oct 05 '15 12:10 vaibhav5923

Could you run

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

This should output some more error information for us.

mhartington avatar Oct 05 '15 13:10 mhartington

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

vaibhav5923 avatar Oct 05 '15 13:10 vaibhav5923

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

mhartington avatar Oct 05 '15 13:10 mhartington

I also installed -allow-root option of bower

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

vaibhav5923 avatar Oct 05 '15 13:10 vaibhav5923

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.

mhartington avatar Oct 05 '15 13:10 mhartington

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

vaibhav5923 avatar Oct 06 '15 10:10 vaibhav5923

is like @mhartington tell on windows start CMD as administrator

FabioParigi avatar Oct 08 '15 14:10 FabioParigi

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!

abhimaliyeckal avatar Oct 12 '15 04:10 abhimaliyeckal

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.

dtslvr avatar Oct 13 '15 07:10 dtslvr

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

bkrajendra avatar Oct 19 '15 16:10 bkrajendra

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",).

jcuervo avatar Oct 23 '15 15:10 jcuervo

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.

justinobney avatar Oct 24 '15 21:10 justinobney

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.

hongyongwhy avatar Oct 25 '15 09:10 hongyongwhy

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

devloperuser avatar Oct 28 '15 06:10 devloperuser

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

dotupNET avatar Oct 28 '15 07:10 dotupNET

This command solved my problem

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

devloperuser avatar Oct 29 '15 06:10 devloperuser