NPM error while updating. I recently upgraded to Node version 7.x. Now npm is not working.
I can not find the error, it may be due to -
npm ERR! Cannot find module 'internal/fs'
npm ERR! Cannot find module 'internal/fs'
.
I get the following when I run sudo npm update -g
-
npm ERR! Linux 3.13.0-101-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "update" "-g" npm ERR! node v7.1.0 npm ERR! npm v3.10.8 npm ERR! code MODULE_NOT_FOUND npm ERR! Cannot find module 'internal/fs' npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues>
My /etc/profile.d/nodejs.sh
has the following contents:
NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript export NODE_PATH
source share