npm install npm -g won't update npm to the latest version

前端 未结 6 1292
刺人心
刺人心 2021-02-19 06:17

I am using npm v5.3.0. Now I want to update npm to v5.4.1.To do this I type the following in my terminal:

npm install -g npm

without any errors.Howe

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-19 06:38

    I solved it on Ubuntu 18.04 LTS by switching to root using sudo su then I run the following

    curl -L https://www.npmjs.com/install.sh | sh
    

提交回复
热议问题