我尝试安装模块以在Node.js中与Superfeedr的XMPP API进行交互。正如这里所解释的(https://github.com/superfeedr/superfeedr-node),这就是我在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)?
答案 0 :(得分:1)
我找到了解决方案的开头:我下载了Python 2.7 在C:\ Python27中 然后通过执行以下操作在Node.js中设置PYTHON变量:
set PYTHON=C:\Python27\Python.exe
(详见Running Python on Windows for Node.js dependencies)
然后重新启动:
npm install superfeedr
错误“gyp ERR!stack Error:找不到Python可执行文件”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")