Search This Blog

Sunday, 2 October 2016

Why npm install Stopped Working

A public service blog post, this time. I recently found that

npm install

had stopped working on my computer. When you typed an install command, all you saw was the spinning cursor, though it had definitely worked the month before.

I managed to track the reason down by a bit of googling and experimenting, but I thought I'd mention it here for posterity. I had recently installed the JSLint package for Sublime, and for reasons best known to itself, it had added its folder to $TEMP. (I suspect it was aiming at $PATH.) My TEMP "folder" was now two folder paths separated with a colon, which completely freaked out npm. I removed the extra folder path and npm went back to normal (after restarting the command shell, of course).