Hi,
I’m currently trying to get started on the tutorials and it went fine until I tried to add platforms.
When ever I entered
ionic platform add ios
or:
ionic platform add android
in my terminal. I would always get an error like:
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 really have no idea what the issue is.
Edit: I am using CLI v1.2.7 if that helps, Thanks.
How did you obtain the project? Did you run something like ionic start project blank? If you used a different method, I’m wondering if there were some missing files.
What happens if you remove all the hyphens? I’ve found that hyphens and spaces cause all kinds of problems.
You are a directory too high. If you are creating a project called todo, you need to run ionic platform add ios from that directory, not ionic-app-base-master.
I actually tried that. The thing is, I noticed that when Ionic creates the project, it places a folder called ionic-app-base-master which has all the necessary files and folders(www, hooks etc.) in the todo folder. If I try to run the command from the todo folder, I get an error saying:
Current working directory is not a Cordova-based project.
If I transfer the files to the todo folder, the ENOENT error returns.