I’ve just started learning ionic. I installed cordova, ionic, etc. and built and launched a few sample apps (tabs) etc., so ionic itself is working, I can run the sample apps in the iOS emulator.
Now, I’d like to try ng-cordova, but can’t get it to work.
Here is what I did: I ‘git clone’-d ng-cordova to my computer (Macbook, if that matters), and using the terminal I did the ‘cd ng-cordova/demo/app’, that’s I assume the sample app to try? But when I do ‘ionic platform add ios’, in that directory, it reports an error: ENOENT, no such file or directory ‘…/demo/app/plugins/ios.json’. What am I doing wrong?
Also the readme.md file in the ng-cordova /demo/app directory seems to be wrong, it describes Ionic App Base, not the demo app (unless I’m missing something obvious).
Thanks for your help, however I’m still getting the same error. I decided to start from scratch, deleted the ng-cordova directory, and did the following:
All of the above seemed to work ok, no error, but then I issued:
ionic platform add ios
and here is what I got back:
================
Running platform task…
Adding platform ios
Creating ios project…
Error: ENOENT, no such file or directory '/Users/Andrei/Documents/ng-cordova/demo/app/plugins/ios.json’
at Object.fs.openSync (fs.js:432:18)
at Object.fs.writeFileSync (fs.js:971:15)
at Object.save_platform_json (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/config-changes.js:442:8)
at PlatformMunger_process [as process] (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/config-changes.js:367:13)
at Object.exports.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/config-changes.js:78:12)
at Object.handlePrepare (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/prepare.js:73:20)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:101:25
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
Unable to add platform ios. Please see console for more info.
================
This is on a Mac OS X Mountain Lion. What am I missing? Thanks!
Have you tried to install the android one ? I had this error when I didn’t have installed the cordova plugins. Can you try to add them before adding the platform ?
I’m on OSX Mavericks. I also had to add the two directories “platforms” and “plugins” manually before I could build or emulate. Also, the first time I run emulate, it launches the simulator and then always exits with an error. After that, when the simulator is up-and-running, it works fine every time.
Did u get ionic run on Windows 7 ? Though i followed steps in the windows inst. tutorial video , i m getting the attached error and i am stuck at that point