LoginSignup
327
121

More than 3 years have passed since last update.

npm install時に「--save」オプションはいらない

Last updated at Posted at 2019-01-13

正直なところもうこの記事はいらないかなと思ったけど他のところから参照されていたりするっぽいので残しておきます

結論

npm 5.0.0 以降からは install 時にデフォルトで save してくれるので --save-S オプションを指定する必要はない。

--save オプションとは?

パッケージのインストール時、package.jsondependencies に追加してくれる機能。

npm v5 以降はインストール時にデフォルトで package.jsondependencies に追加してくれるようになったので --save オプションは不要になった。

npm install saves any specified packages into dependencies by default.

参考

https://docs.npmjs.com/cli/install
https://blog.npmjs.org/post/161081169345/v500

327
121
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
327
121