gpt4 book ai didi

npm5 相当于yarn 的 --pure-lockfile 标志?

转载 作者:行者123 更新时间:2023-12-02 07:58:52 26 4
gpt4 key购买 nike

我正在寻找 yarn --pure-lockfile flag 的等效项.

当您希望它读取锁定文件但不修改它时,在 CI 中安装依赖项时,此标志非常有用。

npm v5 有等效的吗?

最佳答案

npm 5.7 引入了 npm ci 子命令:

the main differences between using npm install and npm ci are:

  • The project must have an existing package-lock.json or npm-shrinkwrap.json.
  • If dependencies in the package lock do not match those in package.json, npm ci will exit with an error, instead of updating the package lock.
  • npm ci can only install entire projects at a time: individual dependencies cannot be added with this command.
  • If a node_modules is already present, it will be automatically removed before npm ci begins its install.
  • It will never write to package.json or any of the package-locks: installs are essentially frozen.

关于npm5 相当于yarn 的 --pure-lockfile 标志?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44800747/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com