This housecleaning worked for me:
mv /usr/local/lib/node_modules /tmp rm -rf /tmp/node_modules/npm curl https://www.npmjs.com/install.sh | sh npm cache clean npm install -g $(ls -1rt /tmp/node_modules/)
The command rm -rf /tmp/node_modules/[package] can be used to remove what might be causing problems or no longer needed.