gpt4 book ai didi

javascript - 在 yarn 中安装所有未满足的依赖项

转载 作者:行者123 更新时间:2023-12-03 12:13:01 25 4
gpt4 key购买 nike

我的 react 应用程序中有错误,它说:

    Line 0:  Parsing error: Cannot find module 'eslint-scope' from '/home/path/.cache/yarn/v6/npm-eslint-7.11.0-aaf2d23a0b5f1d652a08edacea0c19f7fadc0b3b-integrity/node_modules/eslint/lib/api.js'
然后我使用以下命令将 eslint-scope 添加到我的依赖项中:
    yarn add eslint-scope
但我发现了很多未满足的对等依赖项:
    warning " > @testing-library/user-event@12.1.10" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "@typescript-eslint/eslint-plugin@^4.0.0".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "@typescript-eslint/parser@^4.0.0".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "babel-eslint@^10.0.0".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "eslint-plugin-flowtype@^5.2.0".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "eslint-plugin-import@^2.22.0".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "eslint-plugin-jsx-a11y@^6.3.1".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "eslint-plugin-react@^7.20.3".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "eslint-plugin-react-hooks@^4.0.8".
当我尝试安装其中一个时,我发现了另一个未满足的依赖项:
    warning " > @testing-library/user-event@12.1.10" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "@typescript-eslint/eslint-plugin@^4.0.0".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "@typescript-eslint/parser@^4.0.0".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "eslint-plugin-flowtype@^5.2.0".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "eslint-plugin-import@^2.22.0".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "eslint-plugin-jsx-a11y@^6.3.1".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "eslint-plugin-react@^7.20.3".
warning " > eslint-config-react-app@6.0.0" has unmet peer dependency "eslint-plugin-react-hooks@^4.0.8".
我可以自动安装所有未满足的依赖项吗?

最佳答案

首先你应该尝试找出原因eslint-scope需要通过运行此命令 yarn why eslint-scope .
如果您仍然认为需要它,那么您应该知道默认情况下不再安装对等依赖项。 You can read more about it here .在 NPM V7 中 peerDependencies 是 installed automatically again .
现在你应该尝试使用 install-peerdepsnpx install-peerdeps -Y eslint-scope

关于javascript - 在 yarn 中安装所有未满足的依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64543051/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com