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

前端 未结 9 1280
轻奢々
轻奢々 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:57

    If people with linux are facing the problem, here is the solution:

    As of the date of this post, the NPM version packaged with Nodejs doesn't work. If you installed this package, run

    sudo rm -rf /usr/local/bin/npm
    sudo apt-get install node
    sudo mv /usr/bin/npm /usr/local/bin/npm
    

    New version should be 3.10.8 and the old error gone

提交回复
热议问题