title: How can someone deal with webpack versions issues « requires a peer of ... but none is installed »?
body: <p>First I receive this error: <code>optimize-css-assets-webpack-plugin@5.0.4 requires a peer of webpack@^4.0.0</code> then I try with this: <code>npm i optimize-css-assets-webpack-plugin@latest</code> but got that message: <code>terser-webpack-plugin@5.0.3 requires a peer of webpack@^5.1.0</code></p>
  <p><strong>I am seeking for a specific answer to my problem but I think it would be useful also for everyone else to have a general way of thinking about how to deal with similar issues from any other NPM packages</strong></p>
  <ul>
  <li><p>I have this general issue as I am trying to use °NEST JS° &amp; °REACT° &amp; °MY TS WORKFLOW° in the same repo...</p>
  </li>
  <li><p>I don't know if I have to drill down each possible dependency tree or If I have to open multiple issues or if I have to take care of these problems myself (alone)...</p>
  </li>
  <li><p>Below trying to get ZERO warning messages installing 3 versions of  <strong>webpack</strong> <code>next@5.0.0-rc.6</code> <code>lates@5.4.0</code> and <code>4@4.44.2</code></p>
  </li>
  </ul>
  <pre><code>npm install webpack@next # + webpack@5.0.0-rc.6
  
  npm WARN babel-loader@8.1.0 requires a peer of webpack@&gt;=2 but none is installed. You must install peer dependencies yourself.
  npm WARN css-loader@5.0.1 requires a peer of webpack@^4.27.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN eslint-webpack-plugin@2.2.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN file-loader@6.2.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN html-webpack-plugin@4.5.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN mini-css-extract-plugin@1.3.0 requires a peer of webpack@^4.4.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN optimize-css-assets-webpack-plugin@5.0.4 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN postcss-loader@4.0.4 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN sass-loader@10.0.5 requires a peer of webpack@^4.36.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN style-loader@2.0.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN terser-webpack-plugin@5.0.3 requires a peer of webpack@^5.1.0 but none is installed. You must install peer dependencies yourself.
  npm WARN url-loader@4.1.1 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN webpack-dev-middleware@3.7.2 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN webpack-dev-server@3.11.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN webpack-manifest-plugin@2.2.0 requires a peer of webpack@2 || 3 || 4 but none is installed. You must install peer dependencies yourself.
  npm WARN workbox-webpack-plugin@6.0.0-alpha.3 requires a peer of webpack@^4.4.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN terser-webpack-plugin@4.2.3 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
  </code></pre>
  <pre><code>npm install webpack@latest # + webpack@5.4.0
  
  npm WARN optimize-css-assets-webpack-plugin@5.0.4 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN webpack-dev-middleware@3.7.2 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
  npm WARN webpack-manifest-plugin@2.2.0 requires a peer of webpack@2 || 3 || 4 but none is installed. You must install peer dependencies yourself.
  
  </code></pre>
  <pre><code>npm install webpack@4 # + webpack@4.44.2 
  
  npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
  npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
  npm WARN notsup Unsupported engine for watchpack-chokidar2@2.0.0: wanted: {&quot;node&quot;:&quot;&lt;8.10.0&quot;} (current: {&quot;node&quot;:&quot;15.1.0&quot;,&quot;npm&quot;:&quot;6.14.8&quot;})
  npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2@2.0.0
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {&quot;os&quot;:&quot;darwin&quot;,&quot;arch&quot;:&quot;any&quot;} (current: {&quot;os&quot;:&quot;linux&quot;,&quot;arch&quot;:&quot;x64&quot;})
  npm WARN terser-webpack-plugin@5.0.3 requires a peer of webpack@^5.1.0 but none is installed. You must install peer dependencies yourself.
  
  
  </code></pre>