title: When updating Next.js v10.1.13 to webpack5, getting warnings Can't resolve 'fsevents' in chokidar
body: <p><code>npm install next react react-dom</code> And running Node.js v12</p>
  <p>Created most simple <code>pages/index.tsx</code></p>
  <pre class="lang-js prettyprint-override"><code>export default function PageHome(props) {
    return &lt;&gt;Hello World!&lt;/&gt;
  }
  </code></pre>
  <p>(I also had TypeScript configured as per <a href="https://nextjs.org/docs/basic-features/typescript" rel="noreferrer">Next.js instructions</a> but not sure if that's making a difference.)</p>
  <pre><code>C:\GitHub\reproduce-nextjs-webpack5-error&gt;npm run dev
  ...
  event - compiled successfully
  &lt;w&gt; [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve 'fsevents' in 'C:\GitHub\reproduce-nextjs-webpack5-error\node_modules\next\node_modules\chokidar'
  &lt;w&gt; while resolving 'fsevents' in C:\GitHub\reproduce-nextjs-webpack5-error\node_modules\next\node_modules\chokidar to a directory
  &lt;w&gt; [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve 'fsevents' in 'C:\GitHub\reproduce-nextjs-webpack5-error\node_modules\next\node_modules\chokidar'
  &lt;w&gt; while resolving 'fsevents' in C:\GitHub\reproduce-nextjs-webpack5-error\node_modules\next\node_modules\chokidar to a directory
  </code></pre>
  <p>Self-answered solution below for future readers.</p>