I want to update the Ionic CLI tool to the latest version (v1.3.13). I do this:
npm update -g ionic
It appears to work. No errors, it gets all the files successfully.
But - I do this:
ionic --version
And it shows the previous version! Why?
Turns out I had installed Ionic last year, but locally.
I had installed it in C:\Users\myusername\Documents\Nodejs directory.
I removed these files from this directory:
And this folder in the \node-modules directory:
Once I did this, when I ran the command,
ionic --version
...it displayed the correct version, due to it being successfully installed in the global space (AppData\Roaming\npm).
Hope this helps other Windows users.