This post is about the --save
option of the npm install
command, but already
When installing packages with npm, I often see the option --save
when searching the net.
ex) When installing axios
$ npm install axios --save
I don't see it when installing globally with -g
, but I tried to find out who it was.
It seems that it will be registered in dependencies
of package.json
.
When committing to git, the folder node_modules
that installs the package is excluded by .gitignore
.
If you want to clone and build a different development environment from git, restore it based on package.json
.
Therefore, you can easily build the same package environment.
--save
option?The --save
option is not needed in the current environment.
Since npm5.0.0
released on 2017-05-30, --save
is added by default.
Therefore, it is basically unnecessary now except in the old environment.
https://yosuke-furukawa.hatenablog.com/entry/2017/05/30/090602 https://blog.npmjs.org/post/161081169345/v500 https://nodejs.org/ja/download/releases/