I always get this error message when I run \"Ionic start project name\":
Running command - failed![ERROR] An error occurred while run
On Mac OS X (10.12.6), I resolved this issue by doing the following:
brew uninstall --force node
brew install node
I then got an error complaining that node postinstall failed, and to rerun brew postinstall node
I then got an error:
permission denied @ rb_sysopen /usr/local/lib/node_modules/npm/bin/npx
I resolved that error by:
sudo chown -R $(whoami):admin /usr/local/lib/node_modules
And now I don't get this error any more.
This is a helpful video and blog post about removing node from your computer OS. It is a different method of removal based on how you installed node in the first place (brew vs. binary file downloaded from https://nodejs.org/en/
if you installed node with Homebrew then brew uninstall node will work. Verify that with running a node -v
command in your terminal.
Otherwise and if you have installed the binary file from nodeJS's websitethen you have to run this command in your terminal: sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/*/node.*}
. Again, verify that with running a node -v command.
In both cases, successful removal of node should result in bash not recognizing what node is if it is completely removed
Try to remove /usr/local/lib/node_modules/npm
and reinstall node again. This should work.
sudo rm -rf /usr/local/lib/node_modules/npm
brew reinstall node
As mentioned earlier.
sudo rm -rf /usr/local/lib/node_modules/npm
brew uninstall --force node
brew install node
Yes you should re-install node:
sudo rm -rf /usr/local/lib/node_modules/npm
brew uninstall --force node
brew install node
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 isn't 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.