Getting module.js:487 on npm install / npm version

verifying that npm is installed…
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)
Uh oh! npm had a problem! { Error: Command failed: “/home/ubuntu/.nvm/versions/node/v8.2.1/bin/npm” --version
module.js:487
throw err;

Is your project up on Github? It would help to be able to see your source code.

You can try deleting your node_modules folder and running npm -i to see if that fixes things.

Hi, i got that issue fixed now I have below issue:
==> It happened after I mistakenly deleted all dist-tag including latest, is there any way to recover <===
user:~/workspace (master) $ npm dist-tag add @user/workspace@1.0.1 latest
npm ERR! No dist-tags found for @user/workspace

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2017-08-24T22_44_49_995Z-debug.log