npm - 什么是 "yarn install --frozen-lockfile"的 NPM 等价物?

标签 npm npm-install yarnpkg package-lock.json

我正在使用 npm 作为构建生产 docker 镜像的一部分。
我想确保 package-lock.json 不会改变和匹配。

最佳答案

您可以使用 npm ci .

npm ci bypasses a package’s package.json to install modules from a package’s lockfile. This ensures reproducible builds—you are getting exactly what you expect on every install.


https://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable

关于npm - 什么是 "yarn install --frozen-lockfile"的 NPM 等价物?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63187000/

相关文章:

angular - yarn 错误未知工作区 - 为什么 `yarn workspace` 会因 `nohoist` ed 包而失败?

c# - 无法在不同机器上运行Appium

react-native - 无法启动 ReactNativeProject

javascript - "You are running create-react-app 4.0.3 which is behind the latest release (5.0.0)"

node.js - Yarn似乎没有安装越来越少的 watch 编译器

yarnpkg - 我可以导入 "main": "index.js" file from a local yarn workspace dependency package? 之外的子模块吗

macos - 安装后找不到 Gulp 命令

node.js - 如何解决npm Bower安装错误?

javascript - node-gyp 是否带有 npm?

javascript - 'npm add' 和 'npm install --save' 之间的区别?