I have MS Visual Studio 2012 Ultimate and OS is Windows 7, and have nodeJs installed.I wanted to install socket.io using npm,but I get the following error.
C:\\U
I think I found it. Try:
npm install websocket@1.0.3
I found it here
Install dotnet 3.5, so the websockets may be compiled
http://www.microsoft.com/en-us/download/details.aspx?id=21
Make sure you have all the pre-requisite software to run node-gyp
:
You can configure version of Visual Studio used by gyp
via an environment variable so you can avoid having to set the --msvs_version=2012
property.
Examples:
GYP_MSVS_VERSION=2012
for Visual Studio 2012 GYP_MSVS_VERSION=2013e
(the 'e' stands for 'express edition') For the full list see - https://github.com/joyent/node/blob/v0.10.29/tools/gyp/pylib/gyp/MSVSVersion.py#L209-294
This is still painful for Windows users of NodeJS as it assumes you have a copy of Visual Studio installed and many end users will never have this. So I'm lobbying Joyent to the encourage them to include web sockets as part of CORE node and also to possible ship a GNU gcc compiler as part of NodeJS install so we can permanently fix this problem.
Feel free to add your vote at:
Sorry to dig up an old question, but your question is the first result when I searched for "Socket.io VCBuild"
The solution I found, after stumbling around on StackOverflow was:
npm install socket.io --msvs_version=2012
Update from @petf-felzmann. If you're using VS 2015 you can use:
npm install socket.io --msvs_version=2015