I've searched through the web and still can't get if there is any difference between npm add <package>
and npm install --save <package>
.
Thanks.
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.
--save. NPM provides the --save option while installing the packages. If we use the --save option after installing the package, it will be saved in package. json inside dependencies.
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.
As of npm 5.0. 0, installed modules are added as a dependency by default, so the --save option is no longer needed.
npm install
and add
are aliases. The --save
option is deprecated.
Since NPM 5, packages are saved automatically; there is no --save
option.
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