How can I uninstall or upgrade my old node.js version?

  1. Install npm using curl (or wget)
    curl http://npmjs.org/install.sh | sh
  2. Install n using npm
    npm install -g n
  3. Install the latest version of node using n
    n latest

n is a node version manager. It does all the work for you. It installs and switches to the version you specify, or just switches if you already have it installed.

Note: If you’re having trouble installing stuff due to permissions, don’t use sudo. Enter this command once to set your user account as the owner of the /usr/local/ directory, so that you can just issue normal commands in there without sudo. It’s a more sane alternative.

sudo chown -R $USER /usr/local

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)