yarn安装依赖报错Error: ENOENT: no such file or directory?-灵析社区

HAO起起

执行安装命令 `yarn` 报错以下信息 [1/5] 🔍 Validating package.json... warning knight-operation: "dependencies" has dependency "@testing-library/jest-dom" with range "^4.2.4" that collides with a dependency in "devDependencies" of the same name with version "^5.11.6" warning knight-operation: "dependencies" has dependency "@testing-library/react" with range "^9.3.2" that collides with a dependency in "devDependencies" of the same name with version "^11.2.2" [2/5] 🔍 Resolving packages... warning Resolution field "css-loader@3.4.2" is incompatible with requested version "css-loader@4.3.0" [3/5] 🚚 Fetching packages... error http://registry.m.jd.com/fsevents/download/fsevents-1.2.7.tgz: Integrity check failed for "fsevents" (computed integrity doesn't match our records, got "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw== sha1-Z79X9HWPAu3oj7KhcS/vTRU1i+M=") [4/5] 🔗 Linking dependencies... warning " > css-loader@3.4.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". warning " > @dada/custom@0.2.10" has incorrect peer dependency "lodash@^4.17.15". warning "webpack-config-single-spa-react > webpack-config-single-spa > standalone-single-spa-webpack-plugin@1.2.1" has unmet peer dependency "webpack@*". error Error: ENOENT: no such file or directory, open '/Users/wangling86/Library/Caches/Yarn/v6/npm-fsevents-1.2.11-4851b664a3783e52003b3c66eb0eee1074933aa4-integrity/node_modules/fsevents/.yarn-metadata.json' info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 请问如何解决呀,试了网上找到的很多方法都无效,如下,求助 yarn cache clean yarn install --network-timeout 10000000 yarn install --network-concurrency 1 rm -rf node_modules **/node_modules rm -rf yarn.lock **/yarn.lock yarn config set "strict-ssl" false -g

阅读量:152

点赞量:0

问AI
真正的错误原因是这个, 远程库的签名和期望值(yarn.lock中记录的上次安装的)不一致 "Integrity check failed for "fsevents"" 解决: 1. 清理缓存:执行命令"yarn cache clean" 2. 更新本地包的签名:执行命令"yarn --update-checksums"