Error - npm install -g cordova ionic

Hi,
I’ve a problem while installing ionic, below i post the error waht am having, kindly resolve a soon as possible… thanks in advance

npm ERR! Windows_NT 6.1.7601
npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Users\Rey\AppData\Ro
aming\npm\node_modules\npm\bin\npm-cli.js” “install” “-g” "ionic"
npm ERR! node v6.9.4
npm ERR! npm v4.1.2
npm ERR! path C:\Users\Rey\AppData\Roaming\npm\node_modules.staging\ansi-b91782
49
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename ‘C:\Users\Rey\AppData
Roaming\npm\node_modules.staging\ansi-b9178249’ -> 'C:\Users\Rey\AppData\Roamin
g\npm\node_modules\ionic\node_modules\cordova-lib\node_modules\ansi’
npm ERR! enoent ENOENT: no such file or directory, rename ‘C:\Users\Rey\AppData
Roaming\npm\node_modules.staging\ansi-b9178249’ -> 'C:\Users\Rey\AppData\Roamin
g\npm\node_modules\ionic\node_modules\cordova-lib\node_modules\ansi’
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! Please include the following file with any support request:
npm ERR! C:\Users\Rey\npm-debug.log

If you are running overwindows 10. plz right click on CMD command and choose Run As administrator.

2 Likes

i tried it, but still the error remain. my brother said to degrade the node version.is it correct??

When i was getting this error i simply installed first ionic and then cordova
Do a npm install -g ionic and then npm install -g cordova and see if it helps

1 Like

I am using v.7.4.0 and is working properly. my opinion is to try latest version.

1 Like

thank you so much frnd, its work fine:grinning: