title: How can I solve the problem with module 'os' and 'fs' using npm in Laravel 8?
body: <p>Suddenly I received the following error:</p>
  <pre><code>app.js:28823 Uncaught Error: Cannot find module 'os'
  at webpackMissingModule (app.js:28823)
  at Object../node_modules/laravel-mix/src/File.js (app.js:28823)
  at __webpack_require__ (app.js:79613)
  at Object../resources/js/app.js (app.js:6700)
  at __webpack_require__ (app.js:79613)
  at app.js:79751
  at Function.__webpack_require__.O (app.js:79650)
  at app.js:79753
  at app.js:79755
  </code></pre>
  <p>I tried deleting the <code>node_module</code> folder and the <code>package-lock.json</code> file, and run <code>npm install</code>, to no avail.</p>
  <p>When I launch <code>npm run dev</code> I get the following error:</p>
  <pre><code>Error: Can't resolve 'os' in 'C:\...\node_modules\clean-css\lib\options'&quot; -t &quot;Laravel Mix&quot;
  </code></pre>
  <p><strong>UPDATE:</strong> I run <code>npm install --save os</code> and this problem was solved. But another one arose!  <code>Error: Can't resolve 'fs'</code> and this one doesn't resolve with <code>npm install --save fs</code></p>
  <p>NPM version: 7.18.1</p>