运行时yarn add --dev jest,从缓存中获取错误完整性错误。
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.
Run Code Online (Sandbox Code Playgroud)
我尝试删除node_modules,重新运行yarn install,yarn add --dev jest但无济于事。
我该如何解决?
Dou*_*son 98
yarn cache clean要解决此问题,请运行:
yarn cache clean
yarn add --dev jest
Run Code Online (Sandbox Code Playgroud)
从纱线缓存文档中:
yarn cache clean [<module_name...>]运行此命令将清除全局缓存。下次运行纱线或安装纱线时,它将再次填充。此外,您可以指定一个或多个要清理的软件包。
您还可以使用查看缓存yarn cache dir。
yarn cache dir运行纱线缓存目录将打印出当前存储纱线全局缓存的路径。
对于使用 heroku 并看到此错误的任何人:
heroku loginheroku plugins:install heroku-repoheroku repo:purge_cache -a $YOURAPPNAME然后进行手动重建
| 归档时间: |
|
| 查看次数: |
13155 次 |
| 最近记录: |