Nodejs error: Cannot find module ‘npmlog’

I have a problem with Nodejs when i upgrade to v4.2.3 for Windows 7 64bits

    throw err;

Error: Cannot find module 'npmlog'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.j
    at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modul
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)

nodejs error npmlog

How to fix it. Follow to these steps

Step 1: Delete the folder: C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm

Step 2: Goto the folder: C:\Users\Administrator\AppData\Roaming\npm

If you see npm and npm.cmd, delete them

Done, now you can use npm


Usage: npm <command>

where <command> is one of:
    access, add-user, adduser, apihelp, author, bin, bugs, c,
    cache, completion, config, ddp, dedupe, deprecate, dist-tag,
    dist-tags, docs, edit, explore, faq, find, find-dupes, get,
    help, help-search, home, i, info, init, install, issues, la,
    link, list, ll, ln, login, logout, ls, outdated, owner,
    pack, ping, prefix, prune, publish, r, rb, rebuild, remove,
    repo, restart, rm, root, run-script, s, se, search, set,
    show, shrinkwrap, star, stars, start, stop, t, tag, team,
    test, tst, un, uninstall, unlink, unpublish, unstar, up,
    update, upgrade, v, verison, version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm faq          commonly asked questions
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@2.14.7 C:\Program Files\nodejs\node_modules\npm

Recent search terms:

  • Could not find a declaration file for module \prettier\ \/Users/jesse/Desktop/Codesmith/Projects/ReacType/node_modules/prettier/index js\ implicitly has an \any\ type Try `npm install @types/prettier` if it exists or add a new declaration ( d ts) file con

Leave a Reply