Ionic-cli: bug: ionic cli add does not find bower packages

Created on 20 Jul 2015  路  8Comments  路  Source: ionic-team/ionic-cli

_From @gpolyn on July 19, 2015 13:42_

Type: bug

Platform: desktop browser

Components that a 'bower search' can find sometimes result in the following error message after executing 'ionic add'

Failed to find the bower component [...]
Are you sure it exists? (CLI v1.6.1)

Try, for example, well-known and useful packages angularfire and firebase: they appear in bower searches, but result in the error above.

_Copied from original issue: driftyco/ionic#4107_

Most helpful comment

ionic platform add android 

This worked for me

instead of

ionic add platform android

please update the docs

All 8 comments

This is odd, since ionic add is just an alias for bower install --save-dev

https://github.com/driftyco/ionic-cli/blob/master/lib/ionic/add.js#L16

Could you paste the out put from ionic info @gpolyn

Hi Mike,

I am also seeing this trying to run 'ionic add angularfire'

Here's my output of 'ionic info':
Your system information:

Cordova CLI: 5.0.0
Gulp version: CLI version 3.9.0
Gulp local:
Ionic Version: 1.1.0
Ionic CLI Version: 1.4.5
Ionic App Lib Version: 0.0.22
ios-deploy version: 1.7.0
ios-sim version: 4.1.1
OS: Mac OS X Yosemite
Node Version: v0.12.4
Xcode version: Xcode 6.4 Build version 6E35b

Weirdly enough, 'bower install --save-dev angularfire' did work without hitch.

Hmm, just gave ionic add angularfire a try and it worked fine.
Please update your ionic cli to the latest and try again.

Cordova CLI: 5.2.0
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.0
Ionic Version: 1.1.0
Ionic CLI Version: 1.6.4
Ionic App Lib Version: 0.3.8
ios-deploy version: 1.7.0
ios-sim version: 3.1.1
OS: Mac OS X Yosemite
Node Version: v0.10.40
Xcode version: Xcode 6.4 Build version 6E35b

ionic platform add android 

This worked for me

instead of

ionic add platform android

please update the docs

Actually this is occuring when bower is not installed on your computer, ionic don't say it if it's the case

So, you can do:

npm install -g bower
ionic add angularfire

Think it should work now :)

Looks liked the latest beta release of the CLI handles this scenario. Closing this issue.
screen shot 2016-04-21 at 9 23 54 am

Simple use the command ionic start myapp [template]

Was this page helpful?
0 / 5 - 0 ratings