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