2

Here is what I can see on my terminal

ionic add platform android

You must have bower installed to continue. Type npm install -g bower (CLI v1.7.12)

Your system information:

Cordova CLI: 5.4.1 Ionic Version: 1.1.1 Ionic CLI Version: 1.7.12 Ionic App Lib Version: 0.6.5 ios-deploy version: Not installed ios-sim version: 5.0.6 OS: Mac OS X El Capitan Node Version: v4.2.4 Xcode version: Xcode 7.2.1 Build version 7C1002

MacBook-Pro-2:myapp AliSajid$ npm install -g bower /usr/local/bin/bower -> /usr/local/lib/node_modules/bower/bin/bower [email protected] /usr/local/lib/node_modules/bower MacBook-Pro-2:myapp AliSajid$ ionic add platform android

Failed to find the bower component "platform". Are you sure it exists? (CLI v1.7.12)

Your system information:

Cordova CLI: 5.4.1 Ionic Version: 1.1.1 Ionic CLI Version: 1.7.12 Ionic App Lib Version: 0.6.5 ios-deploy version: Not installed ios-sim version: 5.0.6 OS: Mac OS X El Capitan Node Version: v4.2.4 Xcode version: Xcode 7.2.1 Build version 7C1002

0

3 Answers 3

14

The command to add platform have been changed to

ionic cordova platform add android
Sign up to request clarification or add additional context in comments.

1 Comment

> cordova.cmd platform add android at maybeClose (internal/child_process.js:1021:16) at Socket.<anonymous> (internal/child_process.js:430:11) at Socket.emit (events.js:210:5) at Pipe.<anonymous> (net.js:659:12) { stderr: 'npm ERR! code ENOLOCAL\n' + 'npm ERR! Could not install from "android" as it does not contain a package.json file.\n' + '\n' + 'npm ERR! A complete log of this run can be found in:\n' + 'npm ERR! C:\\Users\\Karan\\AppData\\Roaming\\npm-cache\_logs\\2019-12-20T10_46_43_877Z-debug.log\n', code: 1 }
6

You are calling ionic add platform android it should be ionic platform add android.

Also if you are safe to reinstall, perhaps try npm install -g cordova ionic to ensure all latest dependencies.

Comments

0

It seems like you have to install Bower first with npm install -g bower.

1 Comment

MacBook-Pro-2:myapp AliSajid$ npm install -g bower /usr/local/bin/bower -> /usr/local/lib/node_modules/bower/bin/bower [email protected] /usr/local/lib/node_modules/bower MacBook-Pro-2:myapp AliSajid$ ionic add platform android

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.