0

我正在尝试在节点 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

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

谢谢

4

1 回答 1

0

在位于此处的 NPM 自述文件中,它非常清楚地指出:

不能在 Windows 上工作

许多人在让这个模块在 Windows 上工作时遇到问题。失败与在窗口上构建上下文有关。好像是windows环境的问题。我无法访问 Windows 机器,因此无法探索如何完成 Windows 安装过程。如果您知道如何在 Windows 上构建上下文,请给我发送工作说明!

在其 github 页面上发布了几个问题二等。从对问题和回复的粗略一瞥,似乎让这项工作发挥作用可能是一个挑战——但它可能是可能的。你最好的选择是开始阅读这些问题。

于 2013-09-21T19:50:42.753 回答