2013-09-21 60 views
0

我想在節點js上安裝jquery。我這樣做:爲節點j安裝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 

有誰知道如何解決這一問題?

感謝

回答

0

在NPM自述,位於here,它很清楚地指出:

無法在採用了WINDOWS

很多人都在爲得到這個模塊上工作的問題視窗。失敗與建立對話窗口的問題有關。這似乎是一個Windows環境問題。我無法訪問Windows機器,因此無法通過Windows安裝過程探索工作。如果你弄清楚如何在windows上構建文檔,請發給我工作指導!

有公佈了GitHub的頁面,OneTwoso on的幾個問題。從粗略瀏覽問題和答覆,似乎這可能是一個挑戰,讓這個工作 - 但它可能是可能的。你最好的選擇是開始閱讀這些問題。