title: Laravel8 npm run dev outputs: ERESOLVE unable to resolve dependency tree
body: <h3>Goal</h3>
  <p>Avoid error message.
  I have been getting the following error message when I run the command <code>npm run dev</code>:</p>
  <pre><code>npm notice 
  npm notice New major version of npm available! 7.6.1 -&gt; 8.1.4
  npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.1.4
  npm notice Run npm install -g npm@8.1.4 to update!
  npm notice 
  
  npm ERR! code ERESOLVE
  npm ERR! ERESOLVE unable to resolve dependency tree
  npm ERR! 
  npm ERR! Found: acorn@7.4.1
  npm ERR! node_modules/acorn
  npm ERR!   acorn@&quot;^7.0.0&quot; from acorn-node@1.8.2
  npm ERR!   node_modules/acorn-node
  npm ERR!     acorn-node@&quot;^1.6.1&quot; from detective@5.2.0
  npm ERR!     node_modules/detective
  npm ERR!       detective@&quot;^5.2.0&quot; from tailwindcss@2.2.19
  npm ERR!       node_modules/tailwindcss
  npm ERR!         dev tailwindcss@&quot;^2.0.2&quot; from the root project
  npm ERR! 
  npm ERR! Could not resolve dependency:
  npm ERR! peerOptional acorn@&quot;^8.5.0&quot; from terser@5.10.0
  npm ERR! node_modules/terser
  npm ERR!   terser@&quot;^5.9.0&quot; from laravel-mix@6.0.39
  npm ERR!   node_modules/laravel-mix
  npm ERR!     dev laravel-mix@&quot;^6.0.6&quot; from the root project
  npm ERR!   terser@&quot;^5.7.2&quot; from terser-webpack-plugin@5.2.5
  npm ERR!   node_modules/terser-webpack-plugin
  npm ERR!     terser-webpack-plugin@&quot;^5.2.4&quot; from laravel-mix@6.0.39
  npm ERR!     node_modules/laravel-mix
  npm ERR!       dev laravel-mix@&quot;^6.0.6&quot; from the root project
  npm ERR!     1 more (webpack)
  npm ERR! 
  npm ERR! Fix the upstream dependency conflict, or retry
  npm ERR! this command with --force, or --legacy-peer-deps
  npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
  npm ERR! 
  npm ERR! See /home/ml/.npm/eresolve-report.txt for a full report.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /home/ml/.npm/_logs/2021-12-02T07_41_55_149Z-debug.log
  
  </code></pre>
  <h3>Quick Solution:</h3>
  <p>I can avoid the problem / error message with the following command:
  <code>npm install --legacy-peer-deps</code>.</p>
  <p><strong>Output:</strong></p>
  <pre class="lang-js prettyprint-override"><code>npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
  npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
  
  added 807 packages, and audited 808 packages in 12s
  
  84 packages are looking for funding
    run `npm fund` for details
  
  found 0 vulnerabilities
  </code></pre>
  <h3>Question</h3>
  <p>What do I have to do to run <code>npm install</code> again without getting the error message?</p>