I managed to get it working by following Option 2 on the Windows installation instructions on the following page:
https://github.com/nodejs/node-gyp.
I had to close the current command line interface and reopen it after doing the installation on another one logged in as Administrator.