본문 바로가기
develop/etc

[NPM] install시 --save 뜻

by hyoE 2021. 9. 15.
반응형

 

 npm를 통해 패키지를 인스톨 할 때 옵션으로 --save를 붙일 때 가 있어, 궁금해서 찾아봤다.

 

npm install package 

npm install --save package

 

--save가 없으면 node_modules에 설치를 하고 --save가 있으면 package.json의 dependecies에 추가가 된다. 

이에 따라 다음에 프로젝트를 다운받은 후 npm install을 하게 되면 함께 설치가 된다.

 

 협업을 할 때 새롭게 설치한 필요한 필수 모듈의 경우 --save를 붙여 진행하는 것이 좋다고 한다.

 

https://stackoverflow.com/questions/35513712/is-npm-install-the-same-as-npm-install-save

 

Is npm install the same as npm install --save?

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

stackoverflow.com

 

반응형

댓글