0

I recently got an email from MongoDB to update my drivers to be compatible with the new MongoDB 3.0

I am trying to up my Node.js to version "1.4.29". Currently I am the running the node version "0.10.35".

How can I upgrade node.js driver via NPM to 1.4.29 to be compatible with MongoDB 3.0?

I have tried the following:

 npm install g -n

I also tried this:

enter image description here

It just won't install any version higher then 0.10.35, Its stuck at the version. 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.

Which I was told would get the latest version of node but that did not seem to work.

Thanks in advance.

Skywalker
  • 4,074
  • 10
  • 45
  • 100
  • possible duplicate of [How do I update each dependency in package.json to the latest version?](http://stackoverflow.com/questions/16073603/how-do-i-update-each-dependency-in-package-json-to-the-latest-version) – Blakes Seven Sep 14 '15 at 10:20
  • You seem to be confusing the version of the MongoDB driver (1.4.29, although the most recent version is 2.0.43) with the version of Node (0.10.35, although the most recent version is 4.0.0). – robertklep Sep 14 '15 at 10:53
  • @robertklep How do upgrade node.js then. I cant seem to go above 0.10.35. As you say the most recent version is 4.0.0 but i can't seem to get that. – Skywalker Sep 14 '15 at 11:02
  • @user2190986 it depends on your OS (Linux: use your package manager; OS X: download the 4.0.0 installer), although—as you already tried—`n` should work too (it makes switching between versions easier). Not sure why it doesn't in your case. – robertklep Sep 14 '15 at 11:05

2 Answers2

1

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.

npm cache clean
npm update -g

If you desire to install specific version of node then use the command sudo n 0.12.2

Reference taken from How to upgrade Node.js via NPM

0

The way to install the new versions of node with n is to use this command n <version>. For example use n 5.1.0 for the latest version of nodejs.

chj1axr0
  • 101
  • 1
  • 2