title: What does npm install --legacy-peer-deps do exactly? When is it recommended / What's a potential use case?
body: <p>Just ran into this error:</p>
  <pre><code>npm ERR! code ERESOLVE
  npm ERR! ERESOLVE unable to resolve dependency tree
  npm ERR! 
  npm ERR! While resolving: nexttwin@0.1.0
  npm ERR! Found: react@17.0.1
  npm ERR! node_modules/react
  npm ERR!   react@&quot;17.0.1&quot; from the root project
  npm ERR! 
  npm ERR! Could not resolve dependency:
  npm ERR! peer react@&quot;^16.8.0&quot; from react-hook-mousetrap@2.0.4
  npm ERR! node_modules/react-hook-mousetrap
  npm ERR!   react-hook-mousetrap@&quot;*&quot; from the root project
  npm ERR! 
  </code></pre>
  <p>The module I am trying to install seems to have a different peer dependency from what I have installed. It seems like npm changed its behaviour in this regard and now lets the install fail.</p>
  <p>What can I do now to fix this? I don't want to downgrade my React version for this.</p>
  <p>I know there is a flag called <code>--legacy-peer-deps</code> but I am not sure what exactly this does and whether it's recommended to use it / what the potential disadvantages are? I assume there is a reason npm did let the install fail.</p>
  <p>It's just strange because I was using <code>yarn</code> up until very recently and everything was fine.</p>