1

Socket.ioWindows Server 2012にインストールしようとしています

npm install socket.io

私が得ているエラーは

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
 To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.  [D:\PushNotificationServer\node_modules\socket.io\node
_modules\socket.io-client\node_modules\ws\build\binding.sln]
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
 To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.  [D:\PushNotificationServer\node_modules\socket.io\node
_modules\socket.io-client\node_modules\ws\build\binding.sln]
socket.io@0.9.6 node_modules\socket.io
├── policyfile@0.0.4
├── redis@0.6.7
└── socket.io-client@0.9.6 (xmlhttprequest@1.2.2, uglify-js@1.2.5, active-x-obfu
scator@0.0.1, ws@0.4.31)

フレームワーク 2.0 をインストールしましたが、サーバーにインストールするには Visual Studio 2005 のライセンスを購入する必要がありますか? それとも本当にインストールする必要がありますか?または、サーバー エディション用の代替コンパイラはありますか?

私の質問の背後にある理由は、Windows Server 2008 で行われた同じセットアップがエラーをスローしないことです。Windows Server 2008 に特別なものは何もインストールしませんでした。 問題は Server 2012 のみにあります。可能な方法は何ですか?

4

1 に答える 1

0

この問題に対して私が見つけた唯一の解決策:

----サーバー上でバイナリをコンパイルする代わりに、ローカル システム上でコンパイルします。

Socket.ioなどのすべてのバイナリをローカル システムにインストールexpressconnectます。必要なすべてのバイナリがコンパイルされ、node_modulesフォルダにロードされていることを確認してください。

サーバー上のそのフォルダーを FTP で転送するだけです。python 2.7(サーバーにインストールされていることを確認してください)

走る

node server.js //or yourFile.js

そしてそれはうまくいくはずです。

于 2014-03-29T08:51:42.530 に答える