Getting the latest node and npm

3986 views node.js
9

I did sudo apt install nodejs and then checked my versions and I'm on version 8, which is a bit old.

I did sudo npm install -g n and then n latest and it says it has version 11 active, but then node --version spits out 8 again.

What gives?

answered question

Okay, removed the nodejs one, and then latest took over. Strange.

1 Answer

3

You can use nvm the Node version manager (https://github.com/creationix/nvm)

posted this

Have an answer?

JD

Please login first before posting an answer.