question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Peer dependency warnings

See original GitHub issue

Describe the bug

Doing a fresh install results in a lot of peer dep warnings.

Did you try recovering your dependencies?

❯ yarn --version              
1.22.0

Which terms did you search for in User Guide?

peer dependency warning

Environment

react-scripts@5.0.0.

Steps to reproduce

  1. yarn create react-app my-app

Expected behavior

No warnings of any kind.

Actual behavior

warning " > @testing-library/user-event@13.5.0" has unmet peer dependency "@testing-library/dom@>=7.21.4".                                                                                                           
warning "react-scripts > tailwindcss@3.0.16" has unmet peer dependency "autoprefixer@^10.0.2".      
warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-syntax-flow@^7.14.5".
warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-transform-react-jsx@^7.14.9".
warning "react-scripts > react-dev-utils > fork-ts-checker-webpack-plugin@6.5.0" has unmet peer dependency "typescript@>= 2.7".
warning "react-scripts > webpack-dev-server > http-proxy-middleware@2.0.2" has unmet peer dependency "@types/express@^4.17.13".                
warning "react-scripts > eslint-config-react-app > @typescript-eslint/eslint-plugin > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev |
| >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".                                                                                                                                                   

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:24
  • Comments:8

github_iconTop GitHub Comments

4reactions
T3rm1commented, Apr 15, 2022

Would be nice if someone can fix this so we don’t need a workaround.

4reactions
lensbartcommented, Mar 12, 2022

I’m using Yarn 3.2.0 and get the following warning:

➤ YN0002: │ eslint-config-react-app@npm:7.0.0 [07f45] doesn't provide @babel/plugin-syntax-flow (p19435), requested by eslint-plugin-flowtype
➤ YN0002: │ eslint-config-react-app@npm:7.0.0 [07f45] doesn't provide @babel/plugin-transform-react-jsx (p74774), requested by eslint-plugin-flowtype

which can be muted by adding the following to .yarnrc.yml:

packageExtensions:
  # awaiting fix: https://github.com/facebook/create-react-app/issues/11982
  'eslint-plugin-flowtype@*':
    peerDependenciesMeta:
      '@babel/plugin-syntax-flow':
        optional: true
      '@babel/plugin-transform-react-jsx':
        optional: true
Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding and managing peer dependencies in your ...
peerDependencies are for dependencies that are exposed to (and expected to be used by) the consuming code, as opposed to "private" dependencies ...
Read more >
Npm peer dependency error - node.js - Stack Overflow
Effectively, peerDependencies are a way for packages to specify, ... There are warnings, not errors, but it's still worthwhile to fix.
Read more >
Addressing the shortcomings of peer dependencies - HackMD
When the app host does not come up with a resolution that satisfies all peer dependency requirements, we get the classic “unmet peer...
Read more >
You must install peer dependencies warning during npm install
My company's code base runs on node 14.x. Whenever I try to install and build, I get these peer dependency warnings. My main...
Read more >
npm Peer Dependencies - Fathom
When an application includes your module, that application will in turn need to include the declared dependency. With npm version 4 through to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found