使用"npm install -g karma"安装Karma时出错 [英] Error Installing Karma Using "npm install -g karma"

查看:215
本文介绍了使用"npm install -g karma"安装Karma时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在禁用代理的网络中,尝试在命令提示符下使用 npm install -g karma 安装Karma.我面临以下问题-

Trying to Install Karma using npm install -g karma in command prompt, in a Network wherein proxy is disabled. I am facing following issue -

**

C:\Program Files\nodejs>npm install -g karma
npm ERR! network getaddrinfo ENOTFOUND
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "karma"
npm ERR! cwd C:\Program Files\nodejs
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! syscall getaddrinfo
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! Error: EPERM, open 'C:\Program Files\nodejs\npm-debug.log'
npm ERR!  { [Error: EPERM, open 'C:\Program Files\nodejs\npm-debug.log']
npm ERR!   errno: 50,
npm ERR!   code: 'EPERM',
npm ERR!   path: 'C:\\Program Files\\nodejs\\npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "karma"
npm ERR! cwd C:\Program Files\nodejs
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! path C:\Program Files\nodejs\npm-debug.log
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, open 'C:\Program Files\nodejs\npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Program Files\nodejs\npm-debug.log
npm ERR! not ok code 0

** 从错误日志中,我可以了解到以root/Administrator身份再次运行此命令是一种选择,但是我没有Admin权限,因此无法尝试.

** From the error log i can understand that running this command again as root/Administrator is one of the option but i do not have Admin rights so can't try it.

如果您有任何想法/其他选择,请告知如何解决. 预先感谢.

If you have any idea/ other option, please let know how to resolve this. Thanks in advance.

推荐答案

潜在的问题(对我和其他人而言)是npm本身的过时版本. 与此相关的问题,或者与此相关的任何yeoman生成器以及节点v0.12都存在问题.除了将节点还原到v0.10或v0.10.36 ...之外,没有其他永久解决方案.

The underlying problem (for me and many others) is an outdated version of npm itself. There have been issues with this, or any yeoman generator for that matter, and node v0.12. There has been no permanent solution other than to revert node back to v0.10 or v0.10.36...

这篇关于使用"npm install -g karma"安装Karma时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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