Issue
Similar to this question, when I run above commands I got:
[ERROR] Unable to find command: cap build android (or ios)
I considered all the given answers and points for that question, e.g., I ensured:
- capacitor is installed
- android and ios platforms are added
- uninstalled and installed ionic and ionic/cli and ionic/core.
None of the above solved the problem. Does any one have any idea how to get it working? Thanks in advance.
Solution
Well, the solution was quite easy. As for this question @jcesarmobile mentioned, the cli was very old version. You first need to uninstall it via:
npm uninstall -g ionic
npm uninstall -g @ionic/cli
Then as mentioned here, in macOS, you have to remove the ionic directory (run ionic info
to see where it is located).
Then reinstall ionic via:
npm install -g @ionic/cli
Answered By - user6781
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.