I\'ve been trying to install PreRender.Io
on my local machine to test. I\'ve installed Python 2.7.10. When I type:
npm install prerender
<
I'm just going through an Angular JS tutorial and had this issue, but their docs suggest it isn't a problem:
"We often see an npm WARN message after a series of gyp ERR! messages. Ignore them. A package may try to re-compile itself using node-gyp. If the re-compile fails, the package recovers (typically with a pre-built version) and everything works."
https://angular.io/guide/quickstart
I've managed to solve the problem, although it was quite strange. Honestly, I'm not sure which one solved it completely as I've done quite some stuff. I had installed Visual Studio 2015 on my machine. Below is a summary of what I've done:
Installed Visual C++ Compiler, from the VS 2015 installation. By default it was unticked. I think this is what fixed the issue.
Added the path where CL.exe (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin)
and stdlib.h (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include)
are located to the PATH environment variable.
npm install prerender
from the Developer Command Prompt
in of Visual Studio 2015, running in Administrator modeFor me the problem came after installing a new version of node. npm install would show the error above. Then I got the error above but not for the package PreRender.Io but for gulp-sass, though I believe the problem has the same root. To solve it, I installed the previous version of node I'd been using (6.9.5) and then I used nvm to manage node versions as described here: https://www.sitepoint.com/quick-tip-multiple-versions-node-nvm/
Switching to the previous version of node using nvm meant I could do npm install without having to install a large SDK I wasn't going to end up using.