I think I have an installation problem on a new MacBook set up.
All CLI flags/arguments I send to the ionic start
command are ignored - in this instance, -a "MyApp
and -i com.myapp.app
. I have installed all prerequisites (Xcode/npm/cordova, etc.), and I receive no CLI errors when running commands; cordova create
seems to execute fine and I can run the HelloCordova
project which is set up by default fine.
But, when I run ionic start
, it's ignoring the parameters I pass via CLI flags; and I have no idea why! It executes and finishes fine.
As an example, I run:
ionic start -a MyApp -i com.myapp.app ionic-app blank
ionic-app
directory is created, and it configures the correct starting template. However, the app name nor the app ID is set to the parameters I set. I have also tried:
ionic start -a "MyApp" -i com.myapp.app ionic-app blank
No joy. I cannot figure out for the life of me what is wrong. This is the output when I do run the command:
I execute ionic build
and that runs fine. Yet this is the result of Xcode when I open the xcodeproject
file created in platforms/ios/ionic-app
:
Any ideas why this is not fully configuring the project as it should be?
I have tried everything to try to get it working. Uninstall node/cordova/ionic and reinstall each, deleting directories ~/.cordova
, ~/.ionic
and ~/.npm
, yet no joy.
If anybody can shed any light on this, I'd greatly appreciate it.
I'm running: Mac OS X El Capitan 10.11.1 Xcode 7.1.1 Cordova@5.4.1 Ionic@1.7.11
Thanks!
Edit made addition to answer
I found the problem to be Ionic v5.x related; I installed Node v4.x LTS - and although it hasn't seen the problem go away, it's far more reliable.
With Node v4, you need to run ionic prepare
before running ionic build
(I was under the impression ionic build
ran ionic prepare
by default, but clearly not).
When I ran prepare beforehand, there didn't seem to be a problem.