2014-04-03 176 views
0

我嘗試安裝一個模塊以與Superfeedr的XMPP API在Node.js中進行交互。由於這裏(https://github.com/superfeedr/superfeedr-node)解釋說,這是我做的Node.js:Python和Visual Studio需要安裝Node.js模塊(Superfeedr Node.js包裝器)

npm install superfeedr 

但我得到在控制檯以下消息:

// at the beginning it seems ok but then... 

C:\Users\Gabrielle\node_modules\superfeedr\node_modules\node-xmpp\node_modules\node-xmpp-core\node_modules\node-stringprep>node 
"C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild 
gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. 
gyp ERR! stack  at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:101:14) 
gyp ERR! stack  at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:64:11 
gyp ERR! stack  at Object.oncomplete (fs.js:107:15) 
gyp ERR! System Windows_NT 6.0.6001 
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node- 
gyp.js" "rebuild" 
gyp ERR! cwd 

//and much following... 

我缺少的東西?爲什麼提到Python(我根本不使用Python)?

回答

1

我找到了解決方案的開頭:我用C下載的Python 2.7 :\ Python27 然後做設定的Node.js的Python變量:

set PYTHON=C:\Python27\Python.exe 

(詳見Running Python on Windows for Node.js dependencies

,然後重新啓動:

npm install superfeedr 

錯誤「GYP ERR堆棧錯誤:無法找到Python的可執行文件 「蟒蛇」,你ç PYTHON env變量的設置「不再發生。好!

但現在的錯誤消息告訴「不可能加載組件Visual C++」VCBuild.exe「」。它問我:安裝用於Windows Server 2008和.NET Framework 2.0 3.5的開發工具包Microsoft Windows SDK,或者安裝Visual Studio 2008.然後,我收到消息問我:安裝開發工具包.NET Framework 2.0 SDK或安裝Visual Studio 2005.這是另一個問題,我猜...

(請參閱error MSB3411: Could not l oad the Visual C++ component "VCBuild.exe"