I'm looking at the doc page for node and I'm not clear if
npm install gulp-util
is the same as
npm install gulp-util --save
In the doc it says:
"By default, npm install will install all modules listed as dependencies in package.json"
That feels like what --save does,
https://docs.npmjs.com/cli/install
It has a very frequently used command npm install [Package Name] –save. But the fact is there is no difference between npm install [Package Name] and npm install [Package Name] –save in the later version after npm 5.0.
As of npm 5.0. 0, installed modules are added as a dependency by default, so the --save option is no longer needed.
There is no difference, since "npm i" is an alias for "npm install". They both do the exact same thing (install or update all the dependencies in your package-lock.
The npm install installs all modules that are listed on package. json file and their dependencies. npm update updates all packages in the node_modules directory and their dependencies.
Just running npm install
with no arguments, will install everything listed in the dependencies
area of the package.json file.
Running npm install <package-name>
will install that package only, and will not add the package to the dependencies list in package.json
Running npm install <package-name> --save
will install that package only, and will add the package to the dependencies list.
Running npm install <package-name>
will install that package, and will add the package to the dependencies list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With