node.js - 在Windows7上安装node-weak时出错

标签 node.js

我似乎无法在Windows7上加载node-weak。我尝试过Python 2.7、2.5、2.3,但没有成功。看来(从下面的错误来看),我需要使用Python2的版本,但更改版本似乎没有帮助。如有任何帮助,我们将不胜感激。

C:\project1\node_modules\weak>node "C:\Program Files (x86)\nodejs\node_modules\npm\
bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! rebuild error Error: Python executable "c:\Python25\python.exe" is Pyth
on 3, which is not supported.

gyp ERR! rebuild error     at failPython3 (C:\Program Files (x86)\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\configure.js:90:14)
gyp ERR! rebuild error     at C:\Program Files (x86)\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:79:9
gyp ERR! rebuild error     at ChildProcess.exithandler (child_process.js:534:7)
gyp ERR! rebuild error     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! rebuild error     at maybeClose (child_process.js:634:16)
gyp ERR! rebuild error     at Process._handle.onexit (child_process.js:676:5)
gyp ERR! not ok
npm ERR! <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="710614101a31415f435f40" rel="noreferrer noopener nofollow">[email protected]</a> install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="502735313b10607e627e61" rel="noreferrer noopener nofollow">[email protected]</a> install script.
npm ERR! This is most likely a problem with the weak 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 weak
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "weak"
npm ERR! cwd C:\project1
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d3a4b6b2b893e3fde1fde2" rel="noreferrer noopener nofollow">[email protected]</a> install: `node-gyp rebuild`
npm ERR! message `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\project1\npm-debug.log
npm ERR! not ok code 0

最佳答案

显然[email protected]有一个无法正确解析 Python 版本号的错误,但已在 036a730f4a3a95e65d8f390f7f5c4f0d3321e422 (0.5.3) 中修复。为了解决这个问题,我必须更新node-gyp:

cd "C:\Program Files (x86)\nodejs"
npm install node-gyp

解决方案简单,但问题很难追踪。

关于node.js - 在Windows7上安装node-weak时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11443236/

相关文章:

node.js - EADDRNOTAVAIL 在许多 http.get 请求到 localhost 之后

javascript - 如何根据连接表的列对 Bookshelf.js 查询的结果进行排序?

node.js - 在 node.js 中使用 Node 纤程时,在 GC 期间 V8 内部出现 "Fatal error"

javascript - npm cache clean v/s npm cache verify

javascript - 如何从具有多个数组的大对象中获取特定的键值

javascript - Sails : JSON array of Model objects successfully created and displayed, 但只有一些保存到数据库

javascript - javascript 中的词频统计?

node.js - AWS Elastic Search Policy,只允许lambda访问Elastic Search

node.js - Nodejs XMPP 组件使用

css - 在 Node/Puppeteer/Handlebars 中为 HTML/PDF 生成添加页面边框