Issue
When using Ionic, the --no-interactive flag is automatically applied in every command and its very frustrating.
For example, when running ionic start
, I get
--no-confirm: Integrate your new app with Cordova to target native iOS and Android? No
According to the documentation, this should have been a prompt and allowed me to select yes but it selects "no" without prompt. The only thing I could find in the documentation is this:
https://ionicframework.com/docs/cli/configuring.html
Flags CLI flags are global options that alter the behavior of a CLI command.
--help: Instead of running the command, view its help page.
--verbose: Show all log messages for debugging purposes.
--quiet: Only show WARN and ERROR log messages.
--no-interactive: Turn off interactive prompts and fancy outputs. If a CI server is detected (we use ci-info), the CLI is automatically non-interactive.
--confirm: Turn on auto-confirmation of confirmation prompts. Careful: the CLI prompts before doing something potentially harmful. Auto-confirming may have unintended results.
But I'm not sure what a CI server is or how that would have been enabled since this is a fresh install. I tried unisntalling NPM completely, deleting my AppData npm folders and reinstalling but this doesn't solve the problem.
Per this question I tried another solution:
https://github.com/ionic-team/ionic-cli/issues/2744
ionic config set -g interactive true
This modified my global ionic config file but didn't change the outcome. I still have --no-confirm on my ionic start
command.
Solution
It turns out the issue is that my terminal (git bash in this case because powershell doesn't work for some of the stuff I needed to use) didn't support interactive. It would be much more convenient if the error message from Ionic was more specific. My solution was to uninstall windows because it's a crap OS for developers, install Ubuntu, and use the native terminal which works perfectly.
I suppose anyone coming in from Google with the same issue could switch from git bash to Powershell if just for this one operation, but there's a lot of interaction with ionic so you're basically stuck with Powershell instead of git bash.
Answered By - Citizen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.