can't install socket.io on windows 7
tried npm install socket.io
I have VS 2012 installed
get the following errors:
C:\Program Files\nodejs\node_modules\socket.io\node_modules\socket.io-client\no
de_modules\ws\build\bufferutil.vcxproj(18,3): error MSB4019: The imported proje
ct "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the
tried loading the project into VS and building, but get errors there tried setting condition exists in on import of Microsoft.Cpp.Default.props, but build errors persisted. Is there any way around all these errors?
i'm experiencing the same problem
I gave up on windows, but was successful installing on a linux image I had.
On Mon, Feb 4, 2013 at 11:30 AM, Riaku [email protected] wrote:
i'm experiencing the same problem
— Reply to this email directly or view it on GitHubhttps://github.com/LearnBoost/socket.io/issues/1151#issuecomment-13094445.
I'm using it successfully on Win7. Are you installing with nuget or something? I used npm.
I used npm. Are you using VS 2012 - I think the install errors I was getting may have something do to with expectations about file during the build process.
Nope, writing my node code with Webstorm. I'm not clear on why VS2012 would be involved in your install process at all.
What compiles the c code in your environment? My understanding was that you needed VS 2012 on win 7 to compile c during the install.
I don't compile it. I just install with npm, use require on the server side and a script tag on the client side. Are you trying to use it as part of a web app?
Here's the error message I get. There is a build step after it gets all the files. You can see that it is trying to use Microsoft to build and running into a problem.
C:\Users\peltz>npm install socket.io npm http GET https://registry.npmjs.org/socket.io npm http 200 https://registry.npmjs.org/socket.io npm http GET https://registry.npmjs.org/socket.io/-/socket.io-0.9.13.tgz npm http 200 https://registry.npmjs.org/socket.io/-/socket.io-0.9.13.tgz npm http GET https://registry.npmjs.org/socket.io-client/0.9.11 npm http GET https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/base64id/0.1.0 npm http GET https://registry.npmjs.org/redis/0.7.3 npm http 200 https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz npm http 200 https://registry.npmjs.org/redis/0.7.3 npm http GET https://registry.npmjs.org/redis/-/redis-0.7.3.tgz npm http 200 https://registry.npmjs.org/base64id/0.1.0 npm http GET https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz npm http 200 https://registry.npmjs.org/socket.io-client/0.9.11 npm http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9. 11.tgz npm http 200 https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz npm http 200 https://registry.npmjs.org/redis/-/redis-0.7.3.tgz npm http 200 https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9. 11.tgz npm http GET https://registry.npmjs.org/uglify-js/1.2.5 npm http GET https://registry.npmjs.org/ws npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http 200 https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http GET https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscato r-0.0.1.tgz npm http 200 https://registry.npmjs.org/uglify-js/1.2.5 npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz npm http 200 https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tg z npm http 200 https://registry.npmjs.org/ws npm http GET https://registry.npmjs.org/ws/-/ws-0.4.25.tgz npm http 200 https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscato r-0.0.1.tgz npm http 200 https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz npm http 200 https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tg z npm http 200 https://registry.npmjs.org/ws/-/ws-0.4.25.tgz npm http GET https://registry.npmjs.org/zeparser/0.0.5 npm http GET https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/tinycolor npm http GET https://registry.npmjs.org/options npm http 200 https://registry.npmjs.org/zeparser/0.0.5 npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz npm http 200 https://registry.npmjs.org/tinycolor npm http GET https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz npm http 200 https://registry.npmjs.org/options npm http GET https://registry.npmjs.org/options/-/options-0.0.3.tgz npm http 200 https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz npm http 200 https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/commander/-/commander-0.6.1.tgz npm http 200 https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz npm http 200 https://registry.npmjs.org/options/-/options-0.0.3.tgz npm http 200 https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
[email protected] install C:\Users\peltz\node_modules\socket.io\node_modules\socket.io -client\node_modules\ws (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\Users\peltz\node_modules\socket.io\node_modules\socket.io-client\node_modules \ws>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_ modules\node-gyp\bin\node-gyp.js" rebuild Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x 64.Targets(507,5): error MSB8008: Specified platform toolset (v110) is not inst alled or invalid. Please make sure that a supported PlatformToolset value is se lected. [C:\Users\peltz\node_modules\socket.io\node_modules\socket.io-client\no de_modules\ws\build\bufferutil.vcxproj] C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x 64.Targets(507,5): error MSB8008: Specified platform toolset (v110) is not inst alled or invalid. Please make sure that a supported PlatformToolset value is se lected. [C:\Users\peltz\node_modules\socket.io\node_modules\socket.io-client\no de_modules\ws\build\validation.vcxproj] [email protected] node_modules\socket.io ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected] ([email protected], [email protected], active-x-obf [email protected], [email protected])
C:\Users\peltz>
C:\Users\peltz>npm install socket.io npm http GET https://registry.npmjs.org/socket.io npm http 200 https://registry.npmjs.org/socket.io npm http GET https://registry.npmjs.org/socket.io/-/socket.io-0.9.13.tgz npm http 200 https://registry.npmjs.org/socket.io/-/socket.io-0.9.13.tgz npm http GET https://registry.npmjs.org/socket.io-client/0.9.11 npm http GET https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/base64id/0.1.0 npm http GET https://registry.npmjs.org/redis/0.7.3 npm http 200 https://registry.npmjs.org/policyfile/0.0.4 npm http GET https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz npm http 200 https://registry.npmjs.org/redis/0.7.3 npm http GET https://registry.npmjs.org/redis/-/redis-0.7.3.tgz npm http 200 https://registry.npmjs.org/base64id/0.1.0 npm http GET https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz npm http 200 https://registry.npmjs.org/socket.io-client/0.9.11 npm http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9. 11.tgz npm http 200 https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz npm http 200 https://registry.npmjs.org/redis/-/redis-0.7.3.tgz npm http 200 https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9. 11.tgz npm http GET https://registry.npmjs.org/uglify-js/1.2.5 npm http GET https://registry.npmjs.org/ws npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http 200 https://registry.npmjs.org/active-x-obfuscator/0.0.1 npm http GET https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscato r-0.0.1.tgz npm http 200 https://registry.npmjs.org/uglify-js/1.2.5 npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz npm http 200 https://registry.npmjs.org/xmlhttprequest/1.4.2 npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tg z npm http 200 https://registry.npmjs.org/ws npm http GET https://registry.npmjs.org/ws/-/ws-0.4.25.tgz npm http 200 https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscato r-0.0.1.tgz npm http 200 https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz npm http 200 https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tg z npm http 200 https://registry.npmjs.org/ws/-/ws-0.4.25.tgz npm http GET https://registry.npmjs.org/zeparser/0.0.5 npm http GET https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/tinycolor npm http GET https://registry.npmjs.org/options npm http 200 https://registry.npmjs.org/zeparser/0.0.5 npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz npm http 200 https://registry.npmjs.org/tinycolor npm http GET https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz npm http 200 https://registry.npmjs.org/options npm http GET https://registry.npmjs.org/options/-/options-0.0.3.tgz npm http 200 https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz npm http 200 https://registry.npmjs.org/commander npm http GET https://registry.npmjs.org/commander/-/commander-0.6.1.tgz npm http 200 https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz npm http 200 https://registry.npmjs.org/options/-/options-0.0.3.tgz npm http 200 https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
[email protected] install C:\Users\peltz\node_modules\socket.io\node_modules\socket.io -client\node_modules\ws (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\Users\peltz\node_modules\socket.io\node_modules\socket.io-client\node_modules \ws>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_ modules\node-gyp\bin\node-gyp.js" rebuild Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x 64.Targets(507,5): error MSB8008: Specified platform toolset (v110) is not inst alled or invalid. Please make sure that a supported PlatformToolset value is se lected. [C:\Users\peltz\node_modules\socket.io\node_modules\socket.io-client\no de_modules\ws\build\bufferutil.vcxproj] C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x 64.Targets(507,5): error MSB8008: Specified platform toolset (v110) is not inst alled or invalid. Please make sure that a supported PlatformToolset value is se lected. [C:\Users\peltz\node_modules\socket.io\node_modules\socket.io-client\no de_modules\ws\build\validation.vcxproj] [email protected] node_modules\socket.io ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected] ([email protected], [email protected], active-x-obf [email protected], [email protected])
C:\Users\peltz>
I am getting the same error. Why is npm install trying to use MS C++ compiler to compile stuff?
Are js files associated with msbuild or something? Are you running this command from cmd, powershell or bash?
To me it looks like it's trying to run
node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild
and failing there. is that correct?
@jcollum Yes that is what is failing for me on this environment:
- Windows 8
- Visual Studio 2012 Pro installed
- Microsoft Visual Studio C++ 2012 for Windows Desktop
- MS Windows SDK for Win Server 2008 and .NET Framework 3.5 installed
@mnichols Are js files associated with msbuild?
No...that would be odd. Is that a prereq?
Sorry, I was confusing you with rpeltz. Are you also seeing a failure with a line like this?
node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild
@jcollum Yes, precisely. Also, I have python 2.7.3 installed I have variously tried to install Visual Studio VC++ Express editions 2010 and the Windows 2008 SDK . But it won't work before over after those dependencies have been installed. I haven't cracked open the registry to see where it is trying to find MSBuild but I presume that is the failure?
Well the big question is why calling node would load up msbuild. That's what I'm seeing in rpeltz's trace output. I suspect that node-gyp.js is running a command like build and that is getting routed to msbuild instead of ... something else? Maybe rebuild is an MSbuild command?
Also, it's worth considering running node in an ubuntu VM. If you're having trouble with a common library like socket.io ... well it's only gonna get worse. The node community doesn't test their stuff on Windows, typically.
@jcollum I am only on Windows b/c of the project constraints...I would rather put a fork in my eye than work with Windows...but I digress.:) node-gyp uses msbuild under the covers to build the c++ project on windows.That is why it is shelling out to msbuild. To do that, it sniffs the Windows Registry but I think is choking in finding the msbuild.exe. This is really more of an node-gyp question than socket.io question but I saw another person with identical environment reaching the same failure to thought I'd comment.
Ah ok that makes sense now. Wonder if this is related: https://github.com/TooTallNate/node-gyp/issues/198
is there a any solution to solve this problem? I was installed successfully a year ago maybe. that day in Windows7 64bit also. but now does not install. build error. I think this problem seems to occur iconv using node-gyp like module need to build.