Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Windows\system32>npm install caress-server
npm http GET https://registry.npmjs.org/caress-server
npm http 304 https://registry.npmjs.org/caress-server
npm http GET https://registry.npmjs.org/jspack/0.0.1
npm http GET https://registry.npmjs.org/buffertools
npm http 304 https://registry.npmjs.org/jspack/0.0.1
npm http 304 https://registry.npmjs.org/buffertools
> buffertools@2.0.1 install C:\Windows\system32\node_modules\caress-server\node_
modules\buffertools
> node-gyp rebuild
C:\Windows\system32\node_modules\caress-server\node_modules\buffertools>node "G:
\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 PYT
HON env variable.
gyp ERR! stack at failNoPython (G:\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:101:14)
gyp ERR! stack at G:\nodejs\node_modules\npm\node_modules\node-gyp\lib\confi
gure.js:64:11
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "G:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Windows\system32\node_modules\caress-server\node_modules\buffert
ools
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! buffertools@2.0.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the buffertools@2.0.1 install script.
npm ERR! This is most likely a problem with the buffertools package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls buffertools
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "G:\\nodejs\\\\node.exe" "G:\\nodejs\\node_modules\\npm\\bin\\n
pm-cli.js" "install" "caress-server"
npm ERR! cwd C:\Windows\system32
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Windows\system32\npm-debug.log
npm ERR! not ok code 0
C:\Windows\system32>
Run Code Online (Sandbox Code Playgroud)
我正在安装某个NodeJS脚本 - Caress.但我不能.我使用的是Windows 8.1,任何人都可以告诉我我面临的问题是什么,为什么这个安装无法正常工作.buffertools依赖似乎存在问题,就像我能想到的那样.不知道怎么解决这个问题?
如果我从github下载构建并将其放在节点模块中,似乎没有任何工作.当我尝试启动时,使用npm start,或者在执行期间.
G:\nodejs\node_modules\caress-server>npm install
G:\nodejs\node_modules\caress-server>npm start
> caress-server@0.1.1 start G:\nodejs\node_modules\caress-server
> node examples/server.js
info - socket.io started
module.js:340
throw err;
^
Error: Cannot find module './build/Release/buffertools.node'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (G:\nodejs\node_modules\caress-server\node_modules\buf
fertools\buffertools.js:16:19)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
npm ERR! caress-server@0.1.1 start: `node examples/server.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the caress-server@0.1.1 start script.
npm ERR! This is most likely a problem with the caress-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node examples/server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls caress-server
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "G:\\nodejs\\\\node.exe" "G:\\nodejs\\node_modules\\npm\\bin\\n
pm-cli.js" "start"
npm ERR! cwd G:\nodejs\node_modules\caress-server
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! G:\nodejs\node_modules\caress-server\npm-debug.log
npm ERR! not ok code 0
G:\nodejs\node_modules\caress-server>
Run Code Online (Sandbox Code Playgroud)
Ila*_*mer 361
如下所述,您可能不需要在Windows上安装VS,请查看此信息
https://github.com/nodejs/node-gyp/issues/629#issuecomment-153196245
需要node-gyp
安装一些npm插件.
但是,node-gyp
它有自己的依赖(来自github页面):
如果您使用的是Windows,则可以node-gyp
使用单个命令安装所有依赖项(注意:在Windows PowerShell中运行为管理员):
$ npm install --global --production windows-build-tools
Run Code Online (Sandbox Code Playgroud)
然后安装包
$ npm install --global node-gyp
Run Code Online (Sandbox Code Playgroud)
https://github.com/nodejs/node-gyp/issues/809#issuecomment-155019383
删除$ HOME/.node-gyp目录,然后重试.
请参阅此处的完整文档:node-gyp
Ton*_*gan 16
确保您拥有运行所需的所有软件node-gyp
:
您可以node-gyp
通过环境变量配置Visual Studio使用的版本,这样您就可以避免--msvs_version=2012
每次执行npm安装时都必须设置该属性.
例子:
GYP_MSVS_VERSION=2012
为Visual Studio 2012 设置GYP_MSVS_VERSION=2013e
('e'代表免费'快递版')有关完整列表,请参阅 - https://github.com/joyent/node/blob/v0.10.29/tools/gyp/pylib/gyp/MSVSVersion.py#L209-294
对于NodeJS的Windows用户来说,这仍然很痛苦,因为它假设您安装了Visual Studio的副本,并且许多最终用户永远不会拥有此.因此,我正在游说Joyent鼓励他们将Web套接字作为CORE节点的一部分包含在内,并且可以将GNU gcc编译器作为NodeJS安装的一部分发布,这样我们就可以永久性地解决这个问题.
随意添加您的投票:
小智 10
我遇到了错误的问题:
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
Run Code Online (Sandbox Code Playgroud)
这是我正在做的事情和最终奏效的事情.
免责声明:我在Java,Linux世界等多年后,刚刚接手Node,Angular ......
环境描述:Windows 8.1 64位; Cygwin的; cygwin bash shell
使用的命令导致错误:npm install -g karma
错误:gyp ERR!配置错误gyp ERR!stack错误:找不到Python可执行文件"python",可以设置PYT HON env变量.
发现:bash shell上的'python'清楚地显示'/ usr/bin/python'.现在这很烦人!
解决方案:这仅适用于那些使用类似于我所拥有的环境的人,即使用cygwin和bash shell.希望它在其他环境中也有帮助,但请记住,你的茶壶可能看起来与我的有点不同.
export PYTHON ="C:/cygwin64/bin/python2.7.exe(或者系统上的任何版本)"
你现在应该没问题,gyp会找到python可执行文件.
我希望这有助于某人在相同或类似问题上遇到麻烦.
归档时间: |
|
查看次数: |
260610 次 |
最近记录: |