Skip to content

Instantly share code, notes, and snippets.

@thomijasir
Created January 14, 2019 04:01
Show Gist options
  • Save thomijasir/69568980cb7d16167b1b19d176c699e0 to your computer and use it in GitHub Desktop.
Save thomijasir/69568980cb7d16167b1b19d176c699e0 to your computer and use it in GitHub Desktop.
How to upgrade and Update Node.js and NPM Safely

Here's how I successfully upgraded from v0.8.18 to v0.10.20 without any other requirements like brew etc, (type these commands in terminal):

sudo npm cache clean -f (force) clear you npm cache

sudo npm install -g n install "n" (this might take a while)

sudo n stable upgrade to lastest version

Note that sudo might prompt your password.

If the version number doesn't show up when typing node -v, you might have to reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment