安装错误nodejs [英] Installation Error nodejs
问题描述
我已经安装了nodejs,但是当我尝试设置npm(节点包管理)时,它播放了以下错误:
管理员@KINGSRAMK~
$ npm install cordova -g
npm ERR!错误:连接EACCES
npm ERR!在errnoException(net.js:905:11)
npm ERR!在Object.afterConnect上作为oncomplete
npm ERR! {[错误:连接EACCES]代码:'EACCES',错误:'EACCES',系统调用:'c
onnect'}
npm ERR!
npm ERR!请尝试以root / Administrator方式再次运行此命令。
npm ERR!系统Windows_NT 6.2.9200
npm ERR!命令c:\Program Files \\\
odejs\\\
ode.exec:\Program Files \\\
odej
s \\\
ode_modules \ npm \ bin \ nnpm-cli。 jsinstallcordova - g
npm ERR! cwd C:\ Users \Administrator
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR!系统调用连接
npm ERR!代码EACCES
npm ERR! errno EACCES
npm ERR!堆栈错误:连接EACCES
npm ERR!堆栈在errnoException(net.js:905:11)
npm ERR!在Object.afterConnect上堆栈为oncomplete
npm ERR!
npm ERR!其他日志记录详细信息可在以下网址找到:
npm ERR! C:\ Users \ Administrators \ nnpm-debug.log
npm ERR!不行代码0
请指教。
npm install cordova -g
npm ERR!错误:连接EACCES
npm ERR!在errnoException(net.js:905:11)
npm ERR!在Object.afterConnect上作为oncomplete
npm ERR! {[错误:连接EACCES]代码:'EACCES',错误:'EACCES',系统调用:'c
onnect'}
npm ERR!
npm ERR!请尝试以root / Administrator方式再次运行此命令。
npm ERR!系统Windows_NT 6.2.9200
npm ERR!命令c:\Program Files \\\
odejs\\\
ode.exec:\Program Files \\\
odej
s \\\
ode_modules \ npm \ bin \ nnpm-cli。 jsinstallcordova - g
npm ERR! cwd C:\ Users \Administrator
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR!系统调用连接
npm ERR!代码EACCES
npm ERR! errno EACCES
npm ERR!堆栈错误:连接EACCES
npm ERR!堆栈在errnoException(net.js:905:11)
npm ERR!在Object.afterConnect上堆栈为oncomplete
npm ERR!
npm ERR!其他日志记录详细信息可在以下网址找到:
npm ERR! C:\ Users \ Administrators \ nnpm-debug.log
npm ERR!不好的代码0
请建议。
引用:请尝试再次以root身份运行此命令/管理员
错误说明:
Quote:请尝试再次运行此命令root / Administrator。
我认为您可以通过执行错误消息所说的来解决问题;以root身份运行命令。
sudo npm install cordova -g
sudo
将请求您的密码并以root身份运行命令。
在Windows上,您必须以管理员身份运行命令提示符。右键单击命令提示符的文件或快捷方式,然后选择以管理员身份运行。
I have installed nodejs but when I try to set up npm(node package management) its sowing the below error:
Administrator@KINGSRAMK ~
$ npm install cordova -g
npm ERR! Error: connect EACCES
npm ERR! at errnoException (net.js:905:11)
npm ERR! at Object.afterConnect as oncomplete
npm ERR! { [Error: connect EACCES] code: 'EACCES', errno: 'EACCES', syscall: 'c
onnect' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodej
s\node_modules\npm\bin\npm-cli.js" "install" "cordova" "-g"
npm ERR! cwd C:\Users\Administrator
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! syscall connect
npm ERR! code EACCES
npm ERR! errno EACCES
npm ERR! stack Error: connect EACCES
npm ERR! stack at errnoException (net.js:905:11)
npm ERR! stack at Object.afterConnect as oncomplete
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Administrator\npm-debug.log
npm ERR! not ok code 0
Please advice.
npm install cordova -g
npm ERR! Error: connect EACCES
npm ERR! at errnoException (net.js:905:11)
npm ERR! at Object.afterConnect as oncomplete
npm ERR! { [Error: connect EACCES] code: 'EACCES', errno: 'EACCES', syscall: 'c
onnect' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodej
s\node_modules\npm\bin\npm-cli.js" "install" "cordova" "-g"
npm ERR! cwd C:\Users\Administrator
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! syscall connect
npm ERR! code EACCES
npm ERR! errno EACCES
npm ERR! stack Error: connect EACCES
npm ERR! stack at errnoException (net.js:905:11)
npm ERR! stack at Object.afterConnect as oncomplete
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Administrator\npm-debug.log
npm ERR! not ok code 0
Please advice.
Quote:Please try running this command again as root/Administrator
try it as suggested
refer : similar SO Post[^]
The error says this:
Quote:Please try running this command again as root/Administrator.
I think you can solve the problem by doing what the error message said; running the command as root.
sudo npm install cordova -g
sudo
will request your password and run the command as root.
On Windows, you have to run the Command Prompt as administrator. Right-click on the file of the command prompt or on a shortcut to it, and select "Run as Administrator".
这篇关于安装错误nodejs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!