Error “Cannot find module 'npmlog'” after “npm update -g”

前端 未结 9 1264
轻奢々
轻奢々 2020-12-20 11:35

I have NVM 0.30.1 and used it to install node.js v5.4.0 (with NPM 3.5.4) on Fedora 22. When I run npm update -g, I receive the following warnings:



        
9条回答
  •  伪装坚强ぢ
    2020-12-20 11:54

    I have faced the same issue in my Windows 10 PC. After looking into solutions, since i couldn't find the exact solution for the issue i was facing Cannot find module 'npmlog' I just uninstalled the node js and then, deleted both 'npm' and 'npm-cache' in "C:\Users\YourPCName\AppData\Roaming"

    Then, i downloaded the latest version of node from Node JS Website

    And, installed node js

    After that i checked with the path in environment variables.

    Finally run the command prompt 'run as administrator' and npm install npm -g

    Checking your version will show the latest version. 'npm -v'

    I got the latest version - v3.10.9

    Try this. this should work.

提交回复
热议问题