So I'm looking into learning node.js. I've been following this tutorial to install it and try some stuff out.

At any rate, npm is behaving really strangely. It'll work just fine for a while (I changed its viewer config settings, for instance), but then suddenly 'disappear', so that the next time I enter

npm ...(anything)

in the command line, my shell informs me that the npm command has not been found. Previously, uninstalling and then reinstalling npm using nvm has worked, but I'd rather not do this every ten minutes, and it's super weird to me that it will suddenly stop working.

I think the last time, it stopped working after I edited and then re-sourced my ~/.zshrc file -- just added npm and node tab-completion plugins.

Any idea what's going on? I'll post the results of a couple basic commands, but I'm really bad with sysadmin stuff, and I don't really know what to look for here.

nvm -ls

   v0.8.22
current:    v0.10.2
default -> 0.8 (-> v0.8.22)

which node

/usr/bin/node

which npm

npm not found

There's are both nvm (is this a duplicate?) and npm directories directly in my root folder.

If I go into /usr/bin, node is a file, not a directory. There's also a file npm, but not file nvm.

As all the above probably shows, I really have no idea what's going on. I've searched for this, but nobody seems to have this problem. Any ideas what's going on or how to find out?

EDIT Noticing that my default node isn't up-to-date, I did all this. Putting aside why my shell switched me automatically to the bin directory (and why that seems to be a github repo -- no idea what's up with my computer), does this provide any clues?:

➜  node  nvm ali
Edit
Report