I was reading the freshly publish blog post on the brand new Super Starter and I read in the comments that the last CLI should be installed to run this Starter.
So, I open iTerm2 and type a sudo npm install -g ionic to update my CLI.
I ended up with a lot of error and then no “ionic” command can be run again.
I really wish people would stop doing npm things as root. If you use nvm and mess something up, all you have to do is blow away directories in ~/.nvm. When you use sudo, you have no clue or control over where things are being installed or clobbered, and correspondingly no idea how to repair the situation when things go wrong.
On linux you have to deal with the native package manager. Using things outside of the package manager can cause all sorts of headaches for bugs an troubleshooting.
Both have their advantages and disadvantages. And this has nothing to do with the topic.
Nonsense. I have used nvm to manage node packages for years, on various distributions. It works great, requires no superuser privileges, and allows multiple versions of node to be installed alongside one another with no problems.
I disagree. OP has no idea what in their system is broken where, and there is no single place anybody can tell them to clear out. Had they not run npm as root, people trying to help would know that the problem is isolated to their user’s home directory. At an absolute worst case, switching users would give them a blank slate. We can’t say that when sudo gets involved.
I disagree. OP has no idea what in their system is broken where, and there is no single place anybody can tell them to clear out. Had they not run npm as root, people trying to help would know that the problem is isolated to their user’s home directory. At an absolute worst case, switching users would give them a blank slate. We can’t say that when sudo gets involved.
I had the exact same problem as the OP minutes before he posted. The fix I provided works.