安装节点检查器时出现问题

我是node.js的新手我使用“npm install -g node-inspector”来安装node-inspector,但有以下错误:

> ws@0.4.31 install C:\Users\samsung\AppData\Roaming\npm\node_modules\node-inspe ctor\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws > (node-gyp rebuild 2> builderror.log) || (exit 0) >C:\Users\samsung\AppData\Roaming\npm\node_modules\node-inspector\node_modules\so cket.io\node_modules\socket.io-client\node_modules\ws>node "D:\node_modules\npm\ bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild >MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008. [C:\Users\samsung\AppData\Roaming\npm\node_modules\node-inspecto r\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bi nding.sln] >MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008. [C:\Users\samsung\AppData\Roaming\npm\node_modules\node-inspecto r\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bi nding.sln] >C:\Users\samsung\AppData\Roaming\npm\node-inspector -> C:\Users\samsung\AppData\ Roaming\npm\node_modules\node-inspector\bin\inspector.js node-inspector@0.7.0-1 C:\Users\samsung\AppData\Roaming\npm\node_modules\node-in spector ├── debug@0.7.4 ├── async@0.2.9 ├── strong-data-uri@0.1.0 (truncate@1.0.2) ├── glob@3.2.8 (inherits@2.0.1, minimatch@0.2.14) ├── rc@0.3.3 (deep-extend@0.2.6, ini@1.1.0, optimist@0.3.7) ├── express@3.4.8 (methods@0.1.0, fresh@0.2.0, buffer-crc32@0.2.1, merge-desc riptors@0.0.1, range-parser@0.0.4, cookie@0.1.0, cookie-signature@1.0.1, mkdirp@ 0.3.5, commander@1.3.2, send@0.1.4, connect@2.12.0) └── socket.io@0.9.16 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.i o-client@0.9.16) 

我可能想知道我该如何处理呢? 谢谢!我已经成功使用“npm install express”来安装express了。

别担心,在Windows系统上这是正常的。 安装时我得到相同的警告,它工作得很好:

 MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008. [C:\Users\gustavo\AppData\Roaming\npm\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\binding.sln] MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008. [C:\Users\gustavo\AppData\Roaming\npm\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\binding.sln] C:\Users\gustavo\AppData\Roaming\npm\node-inspector -> C:\Users\gustavo\AppData\Roaming\npm\node_modules\node-inspector\bin\inspector.js node-inspector@0.7.0-1 C:\Users\gustavo\AppData\Roaming\npm\node_modules\node-inspector └── ...dependencies C:\Users\gustavo λ node-inspector Node Inspector v0.7.0-1 info - socket.io started Visit http://127.0.0.1:8080/debug?port=5858 to start debugging. 

尝试自己执行node-inspector ;)

另外,如果npm install命令没有完成明确的错误,那么你很好。

一些节点模块必须根据操作系统进行编译。 node-gyp负责这个,但是这需要一个C ++运行时。

所以确保你已经安装了一些C ++库。 请参阅https://npmjs.org/package/node-gyp上有关Windows的安装说明