Cannot find module 'npmlog' Sept 2017 HELP

nodejs
npm

#1

Probable cause : Recently there was an update for it and i ran the command it provided for the update. now NPM does not work I tried going to a older version of node npm i -g npm@5.3.0 but that didn’t work
it seems anything with NPM does not work.
What can i do? I tried digging around in the directories to see if i can find the node folders and see if i can find the npmlog file or something, but i couldn’t find it.

DEV Workspace: https://ide.c9.io/frankcperdomo/webdevspace

=========================================================================
frankcperdomo:~/workspace/RESTfulRouting $ npm init
module.js:487
throw err;
^

Error: Cannot find module 'npmlog’
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at /home/ubuntu/.nvm/versions/node/v8.2.1/lib/node_modules/npm/bin/npm-cli.js:22:13
at Object. (/home/ubuntu/.nvm/versions/node/v8.2.1/lib/node_modules/npm/bin/npm-cli.js:92:3)
at Module._compile (module.js:569:30)
at Object.Module._extensions…js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
frankcperdomo:~/workspace/RESTfulRouting $

==========================================================================

Hey guys I ended up figuring the solution.

Node JS usually comes with an NPM package manger.
If you happen to update it and get the following error something went wrong your npm package manager has been corrupted. So you have to reinstall

This is what i used to reinstall it

curl -L https://www.npmjs.org/install.sh | sh