Incorrect integrity when fetching from the cache

后端 未结 6 1757
感动是毒
感动是毒 2021-02-01 12:04

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

Full output:



        
6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-01 12:56

    yarn cache clean

    To fix this, run:

    yarn cache clean
    yarn add --dev jest
    

    From the yarn cache documentation:

    yarn cache clean []

    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.

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

    yarn cache dir

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

提交回复
热议问题