What does npm install -d --save mean

I recently met one of these operators in a node project that I am currently working on to use node modules locally

npm install -d --save

Can someone please tell me what this means as we used to just use npm install

I want to know the difference between the two

+4
source share
2 answers

From http://npmjs.org/doc/misc/npm-config.html :

The following abbreviations are analyzed on the command line: -d: --loglevel info

From https://www.npmjs.org/doc/install.html

- save: the package will appear in your dependencies.

+5
source

It adds it to your dependencies in your packages. json

,

npm async --save

. json

"dependencies": {
  "async": "~0.2.10",

, , packages.json,

npm init

( node_modules, ), , "npm install" , - .

https://www.npmjs.org/doc/cli/npm-install.html

+4

Source: https://habr.com/ru/post/1530486/


All Articles