Node.js npm安装websocket失败

Node.js npm安装websocket失败,node.js,websocket,npm,Node.js,Websocket,Npm,我正在Windows 7 64位中通过npm安装websocket。websocket版本是1.0.8 即使我有Visual Studio 2010和Python 2.7,我也会遇到链接错误: C:\Windows\system32\node_modules\websocket>node "C:\Program Files (x86)\nodejs\n ode_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\nod

我正在Windows 7 64位中通过npm安装websocket。websocket版本是1.0.8

即使我有Visual Studio 2010和Python 2.7,我也会遇到链接错误:

C:\Windows\system32\node_modules\websocket>node "C:\Program Files (x86)\nodejs\n
ode_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" r
ebuild
  validation.cc
C:\Users\User\.node-gyp\0.10.30\deps\v8\include\v8.h(184): warning C4506: no d
efinition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Hand
le<T>)' [C:\Windows\system32\node_modules\websocket\build\validation.vcxproj]
          with
          [
              T=v8::Object
          ]
LINK : fatal error LNK1104: cannot open file 'C:\Windows\system32\node_modules\w
ebsocket\build\Release\validation.node' [C:\Windows\system32\node_modules\websoc
ket\build\validation.vcxproj]
  xor.cpp
C:\Users\User\.node-gyp\0.10.30\deps\v8\include\v8.h(179): warning C4506: no d
efinition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Hand
le<T>)' [C:\Windows\system32\node_modules\websocket\build\xor.vcxproj]
          with
          [
              T=v8::Object
          ]
LINK : fatal error LNK1104: cannot open file 'C:\Windows\system32\node_modules\w
ebsocket\build\Release\xor.node' [C:\Windows\system32\node_modules\websocket\bui
ld\xor.vcxproj]
gyp[websocket v1.0.8]
    Native code compile failed!!
    Please note that this module DOES NOT REQUIRE the native components
    and will still work without them, though not quite as efficiently.

    On Windows, native extensions require Visual Studio and Python.
    On Unix, native extensions require Python, make and a C++ compiler.
    Start npm with --websocket:verbose to show compilation output (if any).
websocket@1.0.8 node_modules\websocket

C:\Windows\system32>
C:\Windows\system32\node\u modules\websocket>node“C:\Program Files(x86)\nodejs\n
ode_modules\npm\bin\node gyp bin\\..\..\node_modules\node gyp\bin\node gyp.js“r
ebuild
validation.cc
C:\Users\User\.node gyp\0.10.30\deps\v8\include\v8.h(184):警告C4506:无d
内联函数“v8::Persistent v8::Persistent::New(v8::Hand)”的定义
le)“[C:\Windows\system32\node\u modules\websocket\build\validation.vcxproj]
具有
[
T=v8::对象
]
链接:致命错误LNK1104:无法打开文件“C:\Windows\system32\node\u modules\w”
ebsocket\build\Release\validation.node'[C:\Windows\system32\node\u modules\websoc
ket\build\validation.vcxproj]
xor.cpp
C:\Users\User\.node gyp\0.10.30\deps\v8\include\v8.h(179):警告C4506:无d
内联函数“v8::Persistent v8::Persistent::New(v8::Hand)”的定义
le)“[C:\Windows\system32\node\u modules\websocket\build\xor.vcxproj]
具有
[
T=v8::对象
]
链接:致命错误LNK1104:无法打开文件“C:\Windows\system32\node\u modules\w”
ebsocket\build\Release\xor.node'[C:\Windows\system32\node\u modules\websocket\bui
ld\xor.vcxproj]
gyp[websocket v1.0.8]
本机代码编译失败!!
请注意,此模块不需要本机组件
尽管效率不高,但在没有它们的情况下仍能发挥作用。
在Windows上,本机扩展需要Visual Studio和Python。
在UNIX上,本机扩展需要Python、Sub和C++编译器。
使用--websocket:verbose启动npm以显示编译输出(如果有)。
websocket@1.0.8节点\u模块\websocket
C:\Windows\system32>
有没有办法跳过这些编译内容,直接使用这个模块?或者以某种方式修复此错误


PS:命令提示符是以管理员权限启动的。

请注意,此模块不需要本机组件,在没有本机组件的情况下仍然可以工作,尽管效率不高。
是的,但是我想修复这个错误。该模块似乎无法正常工作,因为我在尝试使用它时遇到了一个错误:module.js:340 throw err;错误:在Function.module.处找不到模块“websocket”。\u在Function.module.处解析文件名(module.js:338:15)。\u在module.require处加载(module.js:280:25)在require处加载(module.js:364:17)在require(module.js:380:17)在对象处加载。(P:\Code\Javascript\nodejs\server.js:2:23)在Module.\u编译(Module.js:456:26)在Object.Module.\u扩展..js(Module.js:474:10)在Module.load(Module.js:356:32)在Function.Module.runMain(Module.js:497:10)