When I upgraded my node to 7+ and npm to 4+ I started facing problem while running 'npm install'. It was throwing error ‘Cannot find module 'internal/fs'’. I googled a lot and found out that my node/npm versions were unsupportive of certain modules. I tried to change the version but nothing happened. Then i tried running ‘Gulp’ which I was using in my app for module bundling. To my surprise it said ‘zsh: command not found: gulp’.
Now I thought, the only way to get rid of these problems to re-install node/npm again. I did ‘brew uninstall node’ and still node -v -> v7.4.0 This was frustrating!!!
I googled to see if there is another one line code by Node to uninstall it, but could’nt find anything. Then I read somewhere on the web that I have to remove node from all possible places and only then I will be assured that its been uninstalled.
Below are the steps that you should follow to uninstall node/npm and then re-install it.