每当操作 运行 时,Azure Artifact feed 就会导致 'incorrect integrity when fetching from the cache'

Azure Artifact feed causing 'incorrect integrity when fetching from the cache' whenever an operation is run

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

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

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

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

Azure Artifact feed causing 'incorrect integrity when fetching from the cache' whenever an operation is run

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

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

yarn cache clean
yarn add --dev jest

查看文档yarn cache:

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

yarn policies set-version 1.18

问题跟踪单:

Incorrect integrity when fetching from the cache

希望对您有所帮助。