Node
-
npm install / npm ci 차이점Node 2023. 5. 10. 22:56
들어가기 전에 pacakge.json과 pacakge-lock.json의 차이에 대해서 이해해야 한다. 간략히 차이를 말하자면, package.json은 ^ 등을 이용해서 version range로 버전으로 명시하여 의존성 목록을 만든다. pacakge-lock.json은 정확한 버전을 명시하여 의존성 목록을 만든다. 공통점 의존성 모듈을 설치한다. 차이점 npm install npm install 명령어를 통해 설치를 하면 package.json에 의존성 목록이 추가될 것이고 package-lock.json도 업데이트가 될 것이다. 즉, node_modules와 package-lock.json 파일이 존재하지 않아도 pacakge.json을 보고 node_modules와 pacakge-lock.json..