I would like to use mongodb and nodejs(latest version) on my Amazon EC2 Ubuntu instance. But, when I created my instance I had nodejs_v0.4.9 installed.
Now I would like to upgrade the version of nodejs so that I can use mongoose module to connect to mongodb. Can someone help me?
I'm always prefer to use the package management system. You can use packages from launchpad for 11.10. The complete process should be like this:
sudo apt-get purge nodejs npm
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
Most recent node packages but only for 12.04 & 12.10 located here.
if you have NPM installed do the following:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable