How to change npm's global install folder
It can happen that
npm install -g <package-name> reports an
EPERM error. This means that npm isn't allowed to write to the directory without administrator rights. To fix this npm needs to be configured so that it uses a different folder.
1. Change npm config
npm config set prefix "%AppData%/npm"