将Node.js升级到最新版本 [英] Upgrading Node.js to latest version
问题描述
所以,我已经安装了Node.js,现在当我尝试安装Mongoosejs时,出现了一个错误消息,告诉我我没有所需的Node.js版本(我有v0.4.11和v0.4.12是必需的) ).
So, I have Node.js installed and now when I tried to install Mongoosejs I got an error telling me that I don't have the needed version of Node.js (I have v0.4.11 and v0.4.12 is needed).
如何升级到此版本?我想我可以再次安装最新版本,但是在确定不会删除节点"文件夹中的项目文件夹之前,我不想这样做.
How can I upgrade to this version? I suppose I just could install it again with the latest version, but I don't want to do it before I'm sure that my project folders in the folder "node" won't be deleted.
推荐答案
Linux/Mac:
模块n
使版本管理变得容易:
Linux/Mac:
The module n
makes version-management easy:
sudo npm install n -g
对于最新的稳定版本:
sudo n stable
对于最新版本:
sudo n latest
Windows:
只需从节点网站中的Windows中的.msi重新安装节点.
Windows:
just reinstall node from the .msi in Windows from the node website.
这篇关于将Node.js升级到最新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!