Reputation: 9477
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.
Upvotes: 0
Views: 1908
Reputation: 2330
Try updating npm.
npm install npm -g --ca=null
npm config set ca=""
Upvotes: 1
Reputation: 2197
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
Upvotes: 2