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

bug: ionic cli add does not find bower packages

Open mhartington opened this issue 11 years ago • 8 comments

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

mhartington avatar Jul 20 '15 20:07 mhartington

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

mhartington avatar Jul 20 '15 20:07 mhartington

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

zackhall avatar Aug 23 '15 23:08 zackhall

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

zackhall avatar Aug 23 '15 23:08 zackhall

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

mhartington avatar Aug 25 '15 15:08 mhartington

ionic platform add android 

This worked for me

instead of

ionic add platform android

please update the docs

vibhoo avatar Dec 15 '15 08:12 vibhoo

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

Diliz avatar Apr 21 '16 05:04 Diliz

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

jthoms1 avatar Apr 21 '16 14:04 jthoms1

Simple use the command ionic start myapp [template]

forvela avatar Apr 24 '16 18:04 forvela