반응형
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
반응형
'ETC > develop' 카테고리의 다른 글
[JS] innerHTML & innerText (0) | 2021.09.27 |
---|---|
[TS] Property 'src' does not exist on type 'HTMLElement' (0) | 2021.09.26 |
[JS] 프로그래머스 오픈채팅방 (0) | 2021.09.14 |
[NPM] permission denied error (0) | 2021.09.12 |
[TS] zsh: command not found: tsc (0) | 2021.09.12 |
댓글