[英]Can't upgrade beyond node version 0.10.35
I recently got an email from MongoDB to update my drivers to be compatible with the new MongoDB 3.0 我最近收到了MongoDB的电子邮件,以更新驱动程序以与新的MongoDB 3.0兼容
I am trying to up my Node.js to version "1.4.29". 我正在尝试将Node.js升级到版本“ 1.4.29”。 Currently I am the running the node version "0.10.35".
当前,我正在运行节点版本“ 0.10.35”。
How can I upgrade node.js driver via NPM to 1.4.29 to be compatible with MongoDB 3.0? 如何通过NPM将node.js驱动程序升级到1.4.29以与MongoDB 3.0兼容?
I have tried the following: 我尝试了以下方法:
npm install g -n
I also tried this: 我也试过这个:
It just won't install any version higher then 0.10.35, Its stuck at the version. 它只是不会安装任何高于0.10.35的版本,它停留在该版本上。 In the image above you can see it starts of my install node version 4.0 but ends up with 0.10.35 which I already have.
在上图中,您可以看到它从我的安装节点版本4.0开始,但最终以我已经拥有的0.10.35结尾。
Which I was told would get the latest version of node but that did not seem to work. 有人告诉我可以获取最新版本的node,但似乎不起作用。
Thanks in advance. 提前致谢。
First you need to clean the cache and then start the up gradation process. 首先,您需要清除缓存,然后启动升级过程。 Use the below commands in the NodeJS command window to upgrade to latest version.
在NodeJS命令窗口中使用以下命令升级到最新版本。
npm cache clean
npm update -g
If you desire to install specific version of node then use the command sudo n 0.12.2
如果要安装特定版本的节点,请使用命令
sudo n 0.12.2
Reference taken from How to upgrade Node.js via NPM 来自如何通过NPM升级Node.js的参考
The way to install the new versions of node with n
is to use this command n <version>
. 使用
n
安装新版本的node的方法是使用此命令n <version>
。 For example use n 5.1.0
for the latest version of nodejs. 例如,将
n 5.1.0
用作最新版本的nodejs。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.