In my case npm install was crashing because I was missing Python for what I was trying to install. The way I debugged it was to run npm install PACKAGE --dd which gave me some clues as to what was actually happening.
npm install
npm install PACKAGE --dd