SO despite my comments regarding running shell as administrator working, I ran into this problem on another machine where I was still running shell as administrator.
(A pretty-much-complete extract of the errors are below, for benefit of search-engines)
The errors seemed related to node-gyp
which I was unable to install standalone, and found some notes that helped out:
You need:
- Microsoft Visual Studio C++ 2010 (Express version works well)
- I did already have this
- For 64-bit builds of node and native modules you will also need the Windows 7 64-bit SDK
- This install kept failing, and then I found that
- _the SDK 7.1 does NOT install if you have a newer vcredist_x86.exe than version 10.0.30319 of Visual C++ 2010 x86 Redistributable._ source
- I uninstalled 10.0.[something > 30319]
- Installed the SDK 7.1
- and was then able to
npm i -g node-inspector
with no problems (socket.io
is a dependency)
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(296,5): warning MSB8003: Could not find VCInstallDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\Users\Michael Paulukonis\AppData\Roaming\npm\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj] bufferutil.ccc:\users\michael paulukonis\.node-gyp\0.10.5\deps\v8\include\v8stdint.h(33): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory [C:\Users\Michael Paulukonis\AppData\Roaming\npm\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(296,5): warning MSB8003: Could not find VCInstallDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\Users\Michael Paulukonis\AppData\Roaming\npm\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\validation.vcxproj] validation.ccc:\users\michael paulukonis\.node-gyp\0.10.5\deps\v8\include\v8stdint.h(33): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory [C:\Users\Michael Paulukonis\AppData\Roaming\npm\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\validation.vcxproj]