Notes

Intro to Node Package Manager

Package Management


NPM and Dependency Management

Dependency Management

Imagine bread being a dependency of a sandwich, the bread itself has further dependencies such as flour, yeast, water.

Creating Version Ranges We can designate a range by adding some special characters in our version number.


Using NPM

Using npm to manage npm

Using npm to manage a project’s dependencies

Finding Packages in the NPM Registry Because there are millions of packages in the npm registry, you can ask yourself a few questions:

Dependency Types npm keeps track of two types of dependencies in our package.json file:

  1. Dependencies : Packages that your project needs in order to successfully run when in production.
  2. devDependencies : The packages that are needed locally when doing development work on the project.

There are three additional dependencies called peer dependencies, bundled dependencies, and optional dependencies.

Finding and fixing package security vulnerabilites

{
  "scripts": {
    "start": "node index.js"
  }
}