I'm testing ionic2 and installed node, npm and cordova and it's been working fine. However, I couldn't install any npm package after I updated npm. So I removed all the node and npm related directories according to How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X) and reinstalled node-v6.9.1. But this time again, when I tried to install cordova using 'sudo npm install -g ionic cordova', it gives me an error:
$ rm -rf ~/.npm
$ npm cache clear
$ sudo npm install -g ionic cordova
npm WARN deprecated node-uuid@1.4.7: use uuid module instead
/usr/local/lib
└── ionic@2.1.12
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ionic" "cordova"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! path /usr/local/lib/node_modules/.staging/abbrev-ef9cc920
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-ef9cc920' -> '/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-ef9cc920' -> '/usr/local/lib/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! Please include the following file with any support request:
I've been searching Google and other question on Stackoverflow but could not solve the problem yet. I'm using macOS Seira 10.12.1.
Is this a npm bug or my fault? Is there any possible solution to fix this issue?
Thanks for your helping me.