I ran into this issue recently.
I was trying to install jquery Node package module into my node.js instance using the following command:
npm install jquery –g
Ultimately, the installation failed, and I received a list of errors among which contains:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(514,5):
error MSB8008: Specified platform toolset (v110) is not installed or invalid.
Please make sure that a supported PlatformToolset value is selected.
In the case of the jquery node package module, it seems this may display for the contextify module.
This error may occurred if you have multiple versions of C++ SDKs installed.
If you do have multiple versions of C++ installed, this error simply means that the command prompt that you are running npm under is referencing the wrong version of C++.
In my case, I had installed VS2010 and VS2012 EXPRESS for Desktop in my PC.
The command prompt that I’m using to run npm has references only to the C++ installed with VS2010 – platform toolset (v100).
But the msbuild command that ran when building contextify is referencing the C++ installed with VS2012 – platform toolset (v110).
To resolve this issue, simply run installation command using one of the other command prompts that comes along with VS2012.
Note: By default, using the Developer Command Prompt for VS2012 to install contextify may also result in the same error.
This is because this particular command prompt is missing a VisualStudioVersion environment variable.
If you must use it, execute the following SET statement, before running npm: