1. Javascript

1.1. Node.js

1.1.1. Install

Simply download the Installer direct from the nodejs.org web site.


  1. bash (macOS)

    curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.*>node-(.*)\.pkg</a>.*|\1|p')}.pkg" > "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/"
  2. nvm


    • Install

      brew install nvm

      then add the source line to your profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc)

      export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
      [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
    • List available versions using ls-remote

      nvm ls-remote
    • Download, compile, and install the latest release of node

      nvm install node # "node" is an alias for the latest version
    • Install a specific version of node

      nvm install 6 # or 10, 8, etc
    • Use the installed version

      nvm use node
  3. homebrew

    brew install node

1.1.2. npm


npm install <package>

On Unix systems they are normally placed in /usr/local/lib/node or /usr/local/lib/node_modules when installed globally. If you set the NODE_PATH environment variable to this path, the modules can be found by node.

  • List all global packages and show where they're located

    npm list -g --depth=0
  • Update global package

    npm update -g <package>
  • Find out which package need to be updated

    npm outdated -g --depth=0
  • Update all global packages

    npm update -g
  • npm-check


    npm install -g npm-check