adeyo92 adeyo92 - 7 months ago 187
iOS Question

Cannot add platform for ios and android (Error: ENOENT, no such file or directory)

I was trying to get started on this demo for ionic on a mac OSX

and I got to the point where I was supposed to add platforms so I entered this command in my terminal:

ionic platform add android

but then I got these errors:

Error: ENOENT, no such file or directory '/Users/adeyo/todo/ionic-app-base-master/plugins/android.json'
at Error (native)
at Object.fs.openSync (fs.js:455:18)
at Object.fs.writeFileSync (fs.js:1001:15)
at Object.save_platform_json (/usr/local/etc/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/config-changes.js:476:8)
at PlatformMunger_process [as process] (/usr/local/etc/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/config-changes.js:401:13)
at Object.exports.process (/usr/local/etc/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/config-changes.js:80:12)
at Object.handlePrepare (/usr/local/etc/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/prepare.js:72:20)
at /usr/local/etc/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:102:25
at (native)
at /usr/local/etc/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:66:40

I get a similar error when I try to add an ios platform and I have no Idea how to fix this.

fer fer

Creating the folder plus installing ant worked for me:

mkdir plugins
brew install ant