node.js – Error: Cannot find module ../lib/utils/unsupported.js while using Ionic

node.js – 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

node.js – Error: Cannot find module ../lib/utils/unsupported.js while using Ionic

I received a similar error and now have it working.

First make sure you have the latest version

brew update

Remove your previous instance of node:

brew uninstall node

Then reinstall the latest version:

brew install node

And then make sure it is symlinked into /usr/local if it isnt already. You would get an error to let you know to complete this step.

brew link --overwrite node 

More details on how to install/upgrade node are also available.

Leave a Reply

Your email address will not be published. Required fields are marked *