0

I have problem installing cordova on windows 10, but it worked on another system. What am I doing wrong? I'm trying to install cordova using this command:

npm install -g cordova

But I get this error:

npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! node v5.1.0
npm ERR! npm  v3.5.0

npm ERR! error:0906D06C:PEM routines:PEM_read_bio:no start line
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! node v5.1.0
npm ERR! npm  v3.5.0
npm ERR! path c:\npm-debug.log.12f467e1fd39888240297f05bb2d353b
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall open

npm ERR! Error: EPERM: operation not permitted, open 'c:\npm-debug.log.12f467e1fd39888240297f05bb2d353b'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM: operation not permitted, open 'c:\npm-debug.log.12f467e1fd39888240297f05bb2d353b']
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'c:\\npm-debug.log.12f467e1fd39888240297f05bb2d353b' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

As you see it said run command as an administrator in last line, so I used sudo before my command:

sudo npm install -g cordova

and then I get this error:

'sudo' is not recognized as an internal or external command, operable program or batch file.

I also run this command npm cache clean But I get the same error.

Update:

I run node as an administrator but I get this error:

C:\Windows\system32>npm install -g ionic
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
npm ERR! node v5.1.0
npm ERR! npm  v3.3.12

npm ERR! error:0906D06C:PEM routines:PEM_read_bio:no start line
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

What am I doing wrong? Is this problem related to my OS or what? Any help would be appreciated.

2
  • 1
    run the node.js command prompt as administrator by right clicking on it. Does that work? I tested it on my machine with Windows 10/ all updates no problem. Nov 21, 2015 at 9:24
  • Thanks so much i tried that but i got another error. I updated my question. ;) Nov 21, 2015 at 11:08

2 Answers 2

2

Windows does not have sudo command, try right click your cmd application and use run as administrator option.

Additional info: https://technet.microsoft.com/ru-ru/library/cc947813(v=ws.10).aspx

2
1

Try updating npm.

 npm install npm -g --ca=null
 npm config set ca=""
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.