NodeJS Dependencies

  • using the npm utility to manage node.js packages
  • dependencies are saved in packages.json
  • dependencies in package.json get installed whenever you run npm install without any arguments
  • run npm install –save to persist dependencies in package.json
  • run npm install -g [package] to install package to a folder that is in the PATH environment variable
  • run npm install [package] to install package to the project folder, node_modules
  • the project-level folder, node_modules, should be ignored in version control. (add a line containing node_modules to .gitignore in git)