简体   繁体   English

如何将nodejs升级到最新版本

[英]How to upgrade nodejs to latest version

I'd like to upgrade from the LTS to 8.x. 我想从LTS升级到8.x. I need to integrate this into an existing project. 我需要将它集成到现有项目中。 What's the best way to do that so that my project continues to work no problems after the upgrade? 最好的方法是什么,以便我的项目在升级后继续工作没有问题? (I'm on windows). (我在窗户上)。

Since you are using windows it is easy to upgrade to the latest node js version. 由于您使用的是Windows,因此很容易升级到最新的节点js版本。

Just reinstall node from the .msi in Windows from the node website. 只需从节点网站重新安装Windows中的.msi节点即可。

That will do the trick. 那就行了。

Your project will not be affected after the upgradations. 升级后,您的项目不会受到影响。

Also, npm will be upgraded as well. 此外,npm也将升级。

It's safe to do the following after the upgradations. 升级后执行以下操作是安全的。

npm cache clean
npm update -g

EDIT 编辑

I just want to add the use of nvm that manages multiple node versions without any conflicts to each other versions. 我只想添加管理多个节点版本的nvm的使用,而不会与其他版本产生任何冲突。 You could look into it here 你可以在这里查看

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM