每当运行操作时,Azure Artifact feed都会导致“从缓存中获取时完整性不正确”

时间:2019-10-03 14:10:00

标签: azure azure-devops yarnpkg azure-artifacts

作为旁路,我目前每次都在运行yarn cache clean,但这需要时间+在每次操作之前必须要做一些乏味的工作。

我正在使用.npmrc文件指向azure devops工件提要,该提要提要将npm本身作为上游。

在以相同方式配置的多个项目中,每次都会发生这种情况。

编辑:没关系,这似乎是YARN最新版本的问题

1 个答案:

答案 0 :(得分:3)

  

Azure Artifact提要在每次运行操作时导致“从缓存中获取时完整性不正确”

实际上,这是最新版本的YARN(1.19.0)的问题。

此问题的解决方法正是您现在使用的方法:

yarn cache clean
yarn add --dev jest

检查文档yarn cache

enter image description here

如果您不想在每次操作前清除缓存,可以尝试在服务器上降级yarn版本:

yarn policies set-version 1.18

问题跟踪单:

Incorrect integrity when fetching from the cache

希望这会有所帮助。