当我想升级项目(lodash
包)的依赖项时,我运行以下命令:
yarn upgrade lodash
我遇到以下错误:
yarn upgrade v1.12.3
[1/4] Resolving packages...
[2/4] Fetching packages...
error https://registry.yarnpkg.com/path-postId/-/path-postId-2.0.1.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of data"
我咨询了提到的page,但找不到任何有用的信息来解决此问题。
答案 0 :(得分:0)
以下步骤解决了该问题:
删除yarn.lock
文件。
rm yarn.lock
通过运行以下命令来重新创建yarn.lock
文件:
yarn install
使用--skip-integrity-check
升级依赖项:
yarn upgrade --skip-integrity-check lodash