纱线升级失败

时间:2019-08-26 13:06:29

标签: yarnpkg

当我想升级项目(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,但找不到任何有用的信息来解决此问题。

1 个答案:

答案 0 :(得分:0)

以下步骤解决了该问题:

  1. 删除yarn.lock文件。

    rm yarn.lock
    
  2. 通过运行以下命令来重新创建yarn.lock文件:

    yarn install
    
  3. 使用--skip-integrity-check升级依赖项:

    yarn upgrade --skip-integrity-check lodash