npm 更新成功,但仍显示旧版本

编程入门 行业动态 更新时间:2024-10-27 18:18:17
本文介绍了npm 更新成功,但仍显示旧版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我执行 npm -v 时,我发现我仍然使用 5.6.0.并不断收到执行 npm i npm 的提示.

When I do a npm -v I see that I am still on 5.6.0. And keep getting prompts to do a npm i npm.

但我已经做了一个 sudo npm install npm@latest -g 并用 npm outdated -g --depth=0 仔细检查以查看我的全局npm 已经是最新的 (6.0.0).

But I've done a sudo npm install npm@latest -g and double checked with a npm outdated -g --depth=0 to see that my global npm is at the latest already (6.0.0).

我该如何解决这个冲突?我使用的 npm 是最新的还是旧的?是因为我的全局链接不正确还是什么?

How do I resolve this conflict? Is the npm I'm using the latest or is it still the old one? Is it because my global is linked incorrectly or something?

推荐答案

尝试关闭终端 - 一旦你再次打开它应该可以工作,对我来说效果很好.

*IvanD 在对原帖的评论中写了这个解决方案,我认为值得一个回复帖.

*IvanD wrote this solution in a comment to the original post, I thought it's worth an answer post.

更多推荐

npm 更新成功,但仍显示旧版本

本文发布于:2023-11-05 03:53:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1559819.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:但仍   旧版本   npm

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!