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

时间:2014-01-16 13:02:54

标签: node.js

我是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”来安装快递。

2 个答案:

答案 0 :(得分:3)

别担心,这在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命令没有完成显式错误,那么你很高兴。

答案 1 :(得分:0)

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

因此请确保安装了一些C ++库。请参阅https://npmjs.org/package/node-gyp

上的Windows安装说明