less than 1 minute read

In global mode (i.e., with -g or --global appended to the command), it installs the current package context (i.e., the current working directory) as a global package.

By default, npm install will install all modules listed as dependencies in package.json.

With the --production flag (or when the NODE_ENV environment variable is set to production ), npm will not install modules listed in devDependencies.

To install all modules listed in both dependencies and devDependencies when NODE_ENV environment variable is set to production, you can use --production=false.