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.
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.
npm install
and add
are aliases. The --save
option is deprecated.
Since NPM 5, packages are saved automatically; there is no --save
option.
add
is just an alias for install
.
So the only difference is --save
, which modifies package.json
with the dependancy.
$ npm add --help npm install (with no args, in package dir) npm install [<@scope>/]<pkg> npm install [<@scope>/]<pkg>@<tag> npm install [<@scope>/]<pkg>@<version> npm install [<@scope>/]<pkg>@<version range> npm install <folder> npm install <tarball file> npm install <tarball url> npm install <git:// url> npm install <github username>/<github project> aliases: i, isntall, add common options: [--save-prod|--save-dev|--save-optional] [--save-exact] [--no-save]