Khi chạy yarn add --dev jest, tôi gặp lỗi Toàn vẹn không chính xác khi tìm nạp từ bộ đệm .
Đầu ra đầy đủ:
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.
Tôi đã cố gắng loại bỏ node_modules, chạy lại yarn installvà yarn add --dev jestvô ích.
Làm thế nào để tôi sửa lỗi này?
yarn cache clean. Loại bỏ thủ công đã~/.cache/yarngiải quyết lỗi 'toàn vẹn không chính xác' cho tôi.