Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
372 views
in Technique[技术] by (71.8m points)

node.js - 由于节点版本较新,因此无法更新npm(Can't update npm due to newer version of node)

So I downgraded my npm version because I've been taking an online course and the teacher uses an older version of npm, that being v5.5.1, and I wanted to be using the same version as him for learning purposes but modules have since been updated and don't work the same with the older npm version so I decided to install the latest version again with:

(因此,我降级了npm版本,因为我正在上在线课程,并且老师使用的是npm的较早版本,即v5.5.1,我想使用与他相同的版本进行学习,但是自那时以来,模块一直已更新,并且无法与较旧的npm版本相同,因此我决定通过以下方式再次安装最新版本:)

npm i npm@latest -g

(npm我npm @ latest -g)

but when do so I get the warning:

(但是这样做的时候我得到警告:)

npm WARN npm npm does not support Node.js v12.13.1

(npm WARN npm npm不支持Node.js v12.13.1)

npm WARN npm You should probably upgrade to a newer version of node as we

(npm WARN npm您可能应该升级到较新版本的节点,因为我们)

npm WARN npm can't make any promises that npm will work with this version.

(npm警告npm不能保证npm可以在该版本上使用。)

npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8.

(npm WARN npm支持的Node.js版本是4、6、7、8的最新版本。)

even though Node.js v12.13.1 is the latest stable release and when i check the npm version again it is unchanged.

(即使Node.js v12.13.1是最新的稳定版本,当我再次检查npm版本时,它也保持不变。)

Is there a way I can update npm to it's latest version without uninstalling and reinstalling node?

(有什么方法可以将npm更新为最新版本,而无需卸载并重新安装node?)

I tried just installing the latest Node.js version again and the npm version is unchanged.

(我尝试仅再次安装最新的Node.js版本,而npm版本未更改。)

Thanks in advance!

(提前致谢!)

  ask by Luke Watermeyer translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...