如何解决centos的nodejs npm版本的升级
文章目录
删除node
yum remove nodejs
删除yum源
cd 到yum源配置文件夹:cd /etc/yum.repo.d ,删除以 node 开头的源;
清除 yum 缓存 yum clean all
安装node
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
yum install -y nodejs
更新 npm
npm install npm@latest -g
命令:npm -v 输出版本号就成功安装了。
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论