Cannot find module 'npmlog'

Running windows 7 enterprise. If I run npm install I get:

Error: Cannot find module 'npmlog'
at Function.Module._resolveFilename (module.
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at networkdriveuserhomeAppDatanpmnode_modulesnpmbinnpm-cli.js:20:13
at Object.<anonymous> (networkdriveuserhomeAppDatenpmnode_modulesnpmbinnpm-cli.js76:3)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)

node lives here: H:toolsnode

npm is here: H:toolsnodenode_modulesnpm

Also, if i run "grunt" I get "'grunt' is not recognized as an internal or external command operable program or batch file" but if i run grunt commands from eclipse maven run, everything works.

Do I need to add any paths to my Environment Variables? I only have edit access to USER variables.


I ran into the same problem about a week ago on El Capitan. I fixed it with a reinstall. https://nodejs.org/en/download/


I had the same problem recently and re-installing didn't work, I had to uninstall node and then manually go and delete the "npm" and "npm-cache" folders from

C:Users{yourUsername}AppDataRoaming

I believe this folder is normally hidden, you may have to change some settings to view it.


If you have installed node via nvm, reinstalling it with the official installer worked for me:

  • delete the target version from the nvm folder C:Users{username}AppDataRoamingnvm
  • delete the link in your programms folder C:Programm Filesnodejs
  • install node with the official installer from node.js download
  • 链接地址: http://www.djcxy.com/p/65832.html

    上一篇: 在Eclipse中自动将项目构建到JAR中

    下一篇: 找不到'npmlog'模块