Install all unmet dependencies in yarn

Viewed 1932

There's error in my react app, it says:

    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'

Then I add eslint-scope to my dependencies with the following command:

    yarn add eslint-scope

But I found so much, unmet peer dependencies:

    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".

When I tried install one of those, I found another unmet dependencies:

    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".

can I install all of the unmeet dependencies automatically?

1 Answers

First of all you should try to find out why eslint-scope is needed by running this command yarn why eslint-scope.

If you still think it's needed then you should know that peer dependencies by default are not installed anymore. You can read more about it here. In NPM V7 peerDependencies are installed automatically again.

For now you should try using the install-peerdeps package npx install-peerdeps -Y eslint-scope

Related