【问题标题】:Why AzureDevOps private NPM repo is so slow with node 14 and 16?为什么节点 14 和 16 的 AzureDevOps 私有 NPM 存储库如此缓慢?
【发布时间】:2022-03-31 17:24:17
【问题描述】:

我将 NodeJs 升级到 14(与 16 相同),在我的 MacO 上使用 NVM,删除 package-lock.json 和 node_modules 目录,然后运行 ​​npm i -verbose,安装太慢了,每个都显示 (cache stale)包,安装每个包需要 1 或 2 分钟。如果我将 NodeJs 恢复到 12 或 10,则没有问题。

以下是.npmrc内容,我不想去HTTP:

registry=https://nintex.pkgs.visualstudio.com/_packaging/<MyCompany>/npm/registry/ 
always-auth=true

【问题讨论】:

    标签: node.js macos npm azure-devops


    【解决方案1】:

    这个问题似乎是由过时的本地缓存引起的。

    运行 npm cache clean --force 将清除本地缓存,并且您的 npm 安装应该又快了

    https://docs.npmjs.com/cli/v8/commands/npm-cache

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-03
      • 2015-09-05
      相关资源
      最近更新 更多