Click here to Skip to main content
15,885,086 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.
Posted

Quote:
Please try running this command again as root/Administrator

try it as suggested
refer : similar SO Post[^]
 
Share this answer
 
v2
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".
 
Share this answer
 
v2
Comments
venkatesun 4-Jan-15 10:27am    
Hi, I am trying on windows machine. It won't accept sudo aommand.
Thomas Daniels 4-Jan-15 10:33am    
I edited my answer.
Check the message:
Please try running this command again as root/Administrator.

The error is EACCESS, so you probably have installed some other libraries as another user, maybe using sudo. You might choose to use sudo to run npm install, or you might be able to fix the access in your local ~/.npm directory.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900