Error: Cannot find module '../lib/utils/unsupported.js' while using Ionic
Try to remove /usr/local/lib/node_modules/npm
and reinstall node again. This should work.
On MacOS with Homebrew:
sudo rm -rf /usr/local/lib/node_modules/npm
brew reinstall node
I followed the previous answers and reinstalled node. But I got this error.
Warning: The post-install step did not complete successfully You can try again using
brew postinstall node
So I ran this command
sudo chown -R $(whoami):admin /usr/local/lib/node_modules/
Then ran
brew postinstall node