What is the difference between “npm install” and “npm ci”?

后端 未结 6 1136
北荒
北荒 2020-11-30 16:42

I\'m working with continuous integration and discovered the npm ci command.

I can\'t figure what the advantages are of using this command for my workflow.

6条回答
  •  鱼传尺愫
    2020-11-30 17:30

    npm ci will delete any existing node_modules folder and relies on the package-lock.json file to install the specific version of each package. It is significantly faster than npm install because it skips some features. It's clean state install is great for ci/cd pipelines and docker builds! You also use it to install everything all at once and not specific packages.

提交回复
热议问题