NPM 安装错误 - Node-Pre-Gyp [英] NPM Install Error - Node-Pre-Gyp

查看:169
本文介绍了NPM 安装错误 - Node-Pre-Gyp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行 npm-install 时,我得到:

When I try to run npm-install I get:

npm 错误!Windows_NT 6.3.9600 npm ERR!argv "C:\Program Files(x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "安装" npm ERR!node v4.0.0 npm ERR!npm v2.14.2 npm ERR!代码生命周期

npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x8 6)\nodejs\node_modules\npm\bin\npm-cli.js" "install" npm ERR! node v4.0.0 npm ERR! npm v2.14.2 npm ERR! code ELIFECYCLE

npm 错误!v8-debug@0.4.6 安装:node-pre-gyp 安装--fallback-to-build npm ERR!退出状态 1 npm ERR!npm 错误!在 v8-debug@0.4.6 安装脚本 'node-pre-gyp install --fal 失败lback-to-build'.npm 错误!这很可能是v8-debug 包,npm ERR!不是 npm 本身.npm 错误!告诉作者认为这在您的系统上失败:npm ERR!节点预gyp安装 --fallback-to-build npm ERR!您可以通过以下方式获取他们的信息:npm呃!npm 所有者 ls v8-debug npm ERR!可能有额外的上面记录输出.

npm ERR! v8-debug@0.4.6 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the v8-debug@0.4.6 install script 'node-pre-gyp install --fal lback-to-build'. npm ERR! This is most likely a problem with the v8-debug package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-pre-gyp install --fallback-to-build npm ERR! You can get their info via: npm ERR! npm owner ls v8-debug npm ERR! There is likely additional logging output above.

npm 错误!请在任何支持请求中包含以下文件:npm 错误!C:_Src\Personal\rzaleski\ILikeThis\npm-debug.log

npm ERR! Please include the following file with any support request: npm ERR! C:_Src\Personal\rzaleski\ILikeThis\npm-debug.log

我尝试了很多方法(安装 VS C++ redistrib、npm install --msvs_version=2013 等).似乎没有任何效果.

I tried a number of things (installing VS C++ redistrib, npm install --msvs_version=2013, etc). Nothing seems to work.

你对我如何找出实际错误有什么想法吗(日志有点令人生畏).

Do you have any ideas how I can find out the actual error (the log is a bit daunting).

更新:我最终做的是从 Node v4.0.0 恢复到 NODE v0.12.这并不是真正解决问题,但它让我解决了我的问题.

UPDATE: What I ended up doing was reverting from Node v4.0.0 to NODE v0.12. This is not really a fix to the issue, but it got me around my issues.

推荐答案

转到:(http://www.devdocs.io) 看看@ npm 部分.必须使用桌面,如果可能,必须使用windows(由于某些原因,Mac布局很奇怪)按照重置npm缓存"的详细步骤

Go to: (http://www.devdocs.io) look @ the npm section. Must use desktop, must use windows if possible (Mac layout is weird for some reason) Follow the steps detailed for "resetting npm cache"

Node-gyp 是一个 P.I.T.A.并且经常炸毁安装等等.每次回到我有一段时间没有使用过的环境并尝试再次使用它时,我都会经历一段可怕的时光.

Node-gyp is a P.I.T.A. and often blows up installs among other things. I have a horrible time with it every time I come back to an environment I haven't used in a while and try to use it again.

或者,您可以卸载 node,如果您使用的是 windows,则尝试使用 Chocolatey 重新安装,如果您使用的是 mac,则尝试使用 brew.确保在安装到 mac 时使用 sudo 命令.

Alternatively, you can uninstall node, and attempt to reinstall using chocolatey if you're on windows or brew if you're on a mac. Make sure you sudo commands when installing to mac.

您很可能需要清除 npm 缓存,可能需要重新安装 nodejs,并且可能需要重新安装 node-gyp.

You're most likely going to have to clean out the npm cache, possibly reinstall nodejs, and possibly reinstall node-gyp.

注意:在执行上述步骤之前,首先确保您的配置兼容,包括 node-gyp 的 python 版本.(https://www.npmjs.com/package/node-gyp) 另外,我已经解决了 C++多次可再发行问题而不涉及任何与 C++ 相关的问题,只是为了让您知道此错误并不表示 C++,而是本地设置和与 node + npm 而非 C++ 相关的兼容软件版本(例如,您的 python 版本与 node-吉普)

NOTE: Before you go about the above mentioned steps, first make sure that your configurations are compatible, including your python version for node-gyp. (https://www.npmjs.com/package/node-gyp) Also, I have solved the C++ redistributable issues several times without touching anything C++ related, just so you know this error is not indicative of C++, but rather local settings and compatible software versions that interact with node + npm NOT C++ related (for instance, your python version interacting with node-gyp)

没有简单的运行这个和那个"来解决,你必须要搞得一团糟,我可以向你保证,你必须不止一次这样做.但是你修复 node + npm + node-gyp 的次数越多,你就越有能力在未来快速解决所有问题.上面的链接应该没问题.只需按照指示缓慢而彻底地穿过它们即可.

There is no straightforward "run this and that" to fix, you kind of have to muddle through it, and I can promise you that you'll have to do it more than once. But the more you fix node + npm + node-gyp, the more able you will be to quickly remedy all issues in the future. The links above should sort you out no problem though. Just walk through them slowly and thoroughly as instructed.

这篇关于NPM 安装错误 - Node-Pre-Gyp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆