Reputation: 255
C:\Program Files>npm install -g ionic cordova
C:\Users\myname\AppData\Roaming\npm
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic" "cordova"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! path C:\Users\myname\AppData\Roaming\npm\node_modules\.staging\abbrev-514e00ac
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\myname\AppData\Roaming\npm\node_modules\.staging\abbrev-514e00ac' -> 'C:\Users\myname\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\ab brev'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\myname\AppData\Roaming\npm\node_modules\.staging\abbrev-514e00ac' -> 'C:\Users\myname\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic" "cordova"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! path C:\Program Files\npm-debug.log.3790864127
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall open
npm ERR! Error: EPERM: operation not permitted, open 'C:\Program Files\npm-debug.log.3790864127'
npm ERR! { Error: EPERM: operation not permitted, open 'C:\Program Files\npm-debug.log.3790864127'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\\Program Files\\npm-debug.log.3790864127' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Program Files\npm-debug.log
I have been trying to install ionic on my windows laptop. Before installing ionic on my laptop, I installed nodejs. But after that, everytime I try to install ionic, it shows this error on my command prompt. I also looked for similar problems on this website as well as other but couldn't find any that actually solves my problem. I also looked at npm install -g cordova and ionic 2 error ionic on window 10][1] but the solution provided there would not work either.
Upvotes: 0
Views: 1645
Reputation: 464
Please Follow These Steps:-
1- First check that you have the latest node version. 2- Then search for Command Prompt and RUN IT AS ADMINISTRATOR. 3- then type the above commands :-
npm install -g ionic
npm install -g cordova
Upvotes: 2
Reputation: 1
I solved this problem by uninstalling my nodejs and then installing the new one, nodejs v 5.11
Upvotes: 0
Reputation: 5912
Open nodejs command prompt with administrator permission, redirect to c:> drive, then try same command which you used.
npm install -g ionic cordova
If you still getting the error, then it may be the problem with your node version here is link to refer about this issue and answer from ionic team
Upvotes: 0