Unable to add platform for ios and android (error: ENOENT, no such file or directory)

I tried to start this demo for ionic on Mac OSX http://ionicframework.com/docs/guide/installation.html

and I got to the point where I had to add platforms, so I entered this command into my terminal:

ionic platform add android

      

but then i got the following 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 am getting a similar error when I try to add the ios platform and I have no idea how to fix it.

+3


source to share


4 answers


Creating the folder and installing ant worked for me:



mkdir plugins
brew install ant

      

+5


source


I just needed to create a directory. I already have ant installed.



+1


source


Make sure your current working directory in cmd is in your project, in my case I was parent to it by mistake and tried to add the platform

+1


source


Try updating ionic: npm install -g ionic

0


source







All Articles