1
votes

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:

CLI

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:

Xcode 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 [email protected] [email protected]

Thanks!

Edit made addition to answer

1
what are those that being not fully configured specfically?Pete Houston
Hi @PeteHouston - I will update my answer, but it's ignoring -a and -i; "MyApp" and "com.myapp.app" respectively.keldar
I see, the issue is being discussed here, github.com/driftyco/ionic-cli/issues/673 . For the time being, after starting project like above as you do, issue remove and add ios platform again. The problem is that, the platform project is not updated with the root config.xml. Just wait for the next build.Pete Houston
Thank you! I was logging all over the shot for this, and it sounds like I'm not the only one; I genuinely thought I was going mad. I was starting to think it was related to something in my environment (Node perhaps) as it's also happening on another MacBook Pro with El Capitan. I think it's Node v5 related...keldar
I have rolled back to Node v4.2.3 - the command above runs fine there! So my theory is correct - it is Node v5.x related.keldar

1 Answers

0
votes

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.