If NPM is throwing unexplainable errors, try temporarily disabling your anti-virus application.

TL;DR

I installed the latest Nuget Package Manager (NPM) on my Windows 10 PC and had nothing but problems with getting the simple install command to work.   No matter what I did, I’d get new and more bizarre errors that all seemed to be related to file permission issues (i.e., failures with file renames, making directories, etc.)  I was  running the NPM commands in a PowerShell window as an administrator.

Multiple mysterious errors when trying to run a simple ‘install’ command with NPM

After beating my head on this issue all day, I found out I could disable the WebRoot anti-virus application on my PC that was installed by our network admin.  Once I did that, NPM started working as expected.