从缓存中获取时完整性不正确 [英] Incorrect integrity when fetching from the cache

查看:29
本文介绍了从缓存中获取时完整性不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行 yarn add --dev jest 时,我收到 错误完整性错误,从缓存中获取时.

When running yarn add --dev jest, I got error Incorrect integrity when fetching from the cache.

tests (master)$ yarn add --dev jest
yarn add v1.19.0
info No lockfile found.
[1/4] Resolving packages...
warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > left-pad@1.3.0: use String.prototype.padStart()
[2/4] Fetching packages...
error Incorrect integrity when fetching from the cache
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

我尝试删除 node_modules,重新运行 yarn installyarn add --dev jest 无济于事.

I tried removed node_modules, re-ran yarn install and yarn add --dev jest to no avail.

我该如何解决这个问题?

How do I fix this?

推荐答案

yarn cache clean

要解决此问题,请运行:

yarn cache clean

To fix this, run:

yarn cache clean
yarn add --dev jest

来自纱线缓存文档:

运行此命令将清除全局缓存.下次运行 yarn 或 yarn install 时,它将再次填充.此外,您可以指定要清理的一个或多个包.

yarn cache clean [<module_name...>]

Running this command will clear the global cache. It will be populated again the next time yarn or yarn install is run. Additionally, you can specify one or more packages that you want to clean.

您还可以使用 yarn cache dir 查看缓存的位置.

You can also see where the cache is with yarn cache dir.

运行 yarn cache dir 会打印出当前存储 yarn 全局缓存的路径.

yarn cache dir

Running yarn cache dir will print out the path where yarn’s global cache is currently stored.

这篇关于从缓存中获取时完整性不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆