Skip to content

Instantly share code, notes, and snippets.

@MichaelCurrin
Last active December 26, 2022 02:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MichaelCurrin/aa1fc56419a355972b96bce23f3bccba to your computer and use it in GitHub Desktop.
Save MichaelCurrin/aa1fc56419a355972b96bce23f3bccba to your computer and use it in GitHub Desktop.
Install Node.js and NPM

How to install Node.js and NPM

Links:

Get Node.js and NPM (always installed together):

  • Debian / Ubuntu - based on Node docs.
    1. Optional step - set up a target Node version such as v14. If you skip, this you'll get the stable version for your OS, such might be say v12 or v10.
      $ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
      $ sudo apt update
    2. Install Node using APT.
      $ sudo apt install nodejs
  • Red Hat / Fedora / CentOS
  • macOS - use a Brew formula.
    $ brew install node
  • Windows
  • Other systems

If you prefer, you can install Node.js by installing and using NVM - see gist.

Check installed versions:

  • Node.js
    $ node --version
    v14.2.0
  • NPM
    $ npm --version
    6.14.4

Use your package manager to update to newer versions of Node.

If you need to upgrade just NPM, use NPM like this:

$ npm install -g npm

To start using NVM, see this Install Node with NVM gist.

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