The problem-个
在我现有的Vue项目中,如果我运行yarn install
或yarn add package_name
命令,则会发生以下错误-
What I read-个
在阅读了this article(向下滚动到"Integrity Hash"部分)之后,我能够对这个错误有一些了解-
YAR将根据以下内容计算每个依赖项安装的哈希值 下载的内容.下次你下载它的时候 依赖项,则Yarn 再次生成散列. 如果新值与存储在ya n.lock中的值不匹配,则会抛出如下所示的错误:
Integrity check failed for <package-name> (computed integrity doesn't match our records, got <integrity-hash-value>
)
我相信我的错误是相关的.在this article中还建议的解决方案是阅读有关罪犯依赖的信息,如果可以安全使用,请重新安装它.我也读了这篇GitHub issue.
My concern-个
据我所知,我的yarn.lock
人中有once a resolved version is specified in 100 that will always be the version installed whenever you run 101.人,yargs-parser
的版本是20.2.1
.
我应该重新安装这个yargs-parser
依赖项吗?如果是,那么如何重新安装?我有点担心重新安装对其他依赖项的影响.
My environment details-个
以下包管理器全局安装在我的系统中-
node- 14.19.0
yarn- 1.22.4
npm- 6.14.16
如果需要,我可以提供进一步的细节.任何帮助都会起到很大作用.