为节点js安装jquery时出错

时间:2013-09-21 17:45:57

标签: jquery .net node.js installation

我正在尝试在节点js上安装jquery。我这样做了:

npm install jquery

结果是:

Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
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.  [C:\Users\Blah\node_modules\jquery\n
ode_modules\contextify\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `c:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Blah\node_modules\jquery\node_modules\co
ntextify
gyp ERR! node -v v0.10.18
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

有谁知道如何解决这个问题?

由于

1 个答案:

答案 0 :(得分:0)

在位于here的NPM自述文件中,它非常明确地指出:

  

不在WINDOWS上工作

     

许多人在使用此模块在Windows上工作时遇到问题。失败与在窗口上构建上下文有关。这似乎是一个Windows环境问题。我无法访问Windows机器,所以我无法通过Windows安装过程探索工作。如果你弄清楚如何在windows上构建contextify,请发给我工作说明!

在其github页面OneTwoso on上发布了几个问题。从粗略地看一眼问题和回复看,这似乎是一个挑战,让这个工作 - 但它可能是可能的。你最好的选择是开始阅读这些问题。