Skip to content

Instantly share code, notes, and snippets.

@mrozilla
Created June 25, 2017 13:49
Show Gist options
  • Save mrozilla/12318abcf32c9ca359ca39b48c5d560c to your computer and use it in GitHub Desktop.
Save mrozilla/12318abcf32c9ca359ca39b48c5d560c to your computer and use it in GitHub Desktop.
Check if node and npm are installed on your machine.

Check if node and npm are installed on your machine

macOS

  1. Open your terminal (e.g. by clicking on the magnifying glass icon in the upper-right corner of the menu bar and typing "Terminal") Image of macOS menu bar

  2. To check in node.js is installed, run

    node -v
    

    You should see something like v8.1.2 in the terminal. If you see node: command not found or similar, follow the installation instructions on https://nodejs.org.

  3. To check if npm is installed, run

    npm -v
    

    You should see something like 5.0.3 in the terminal. npm is generally automatically installed when you install node. If you see npm: command not found or similiar, your best shot is to reinstall node.js following the installation instructions on https://nodejs.org.

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