Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 http://ionicframework.com/docs/guide/installation.html

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 Array.map (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.

like image 277
adeyo92 Avatar asked Mar 19 '23 06:03

adeyo92


2 Answers

Creating the folder plus installing ant worked for me:

mkdir plugins
brew install ant
like image 150
fer Avatar answered Mar 29 '23 23:03

fer


I just had to make the directory. I already had ant installed.

like image 34
wilblack Avatar answered Mar 29 '23 23:03

wilblack