Why nodejs command line always install an old version?

My questions are

Whenever i tried to install nodejs using command line

# apt-get install nodejs

it installs the older version (in my case it installed 0.10.x),where as the current version till date is 4.1.2 .Why this command do not gives me a latest version.Is there any other way to install the latest version though i tried using nvm.

I checked the installed versions

node -v && npm -v && cordova -v
v0.12.7
3.3.5
5.3.3

It seems node v0.12.7 is installed in my system but when i am trying to install ionic

npm install -g cordova ionic

i am finding the error

    npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} 

(current: {"node":"0.12.7","npm":"3.3.5"})

even my current version is greater then the required version why its throwing me an error,do it strict with the specific version.


Source: ubuntu

Leave a Reply