I have managed to corrupt my npm install, and whenever I try to install packages using npm install, I receive error messages along these lines:
npm
npm install
Above answer didn't work for me. Just try to run your command with --unsafe-perm.
--unsafe-perm
e.g
npm install -g node@latest --unsafe-perm
This seems to solve the problem.