I am trying to switch to ionic2. Installing on top of my previous installation of ionic 1 appears to succeed (based on the output) but ionic1 remains as shown by ionic info. Here were the steps. Any help would be appreciated.
With some investigation I found out what was going wrong. At some point earlier I had installed ionic version 1 which got loaded by npm in /usr/local/lib as part of the sub-directory node_modules. Later on when I installed version 2 globally with sudo it installed it in my home directory ~/.npm-global/lib/node_modules/ionic/bin. The installed program was a node script called ionic. The bash alias was still pointing to the version 1 code. I don't know why npm changed the directory. To fix the problem, I did the following:
ionicionic in ~/.npm-global/lib/node_modules/ionic/bin.ionicionic so I can access the command from anywhere in my home directory.I should have found this earlier but I am getting rusty in my command line skills. It turns out that ionic-cli is works for both v1 and v2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With