title: Laravel mix - UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory
body: <p>I think I have an install problem somewhere. I have updated to the latest node and npm, I did npm install in my root dir.
  When I do &quot;npm run dev&quot; it cannot find 'C:\public\css\site.css'. Well, it's right! But it doesn't supposed to look for a file at that place. The file site.css in the folder C:\xampp734\templatedocs is updated after I run the command but also with the error message.</p>
  <p>So, what is causing the message?</p>
  <p><strong>My webpack.mix.js</strong></p>
  <pre><code>let mix = require('laravel-mix');
  
  mix.js('resources/js/bootstrap.js', 'public/libs/bootstrap/js')
      .js('resources/js/mobilenav.js', 'public/js')
      .js('resources/js/pixieLib.js', 'public/js')
      .js('resources/js/rangeslider.js', 'public/js')
      .js('resources/js/site.js', 'public/js')
      
      .sass('resources/sass/bootstrap.scss', 'public/libs/bootstrap/css')
      .sass('resources/sass/site.scss', 'public/css')
      
      .copyDirectory('node_modules/@glidejs/glide/dist', 'public/plugins/glide')
      .version();
  </code></pre>
  <p><strong>My package.json</strong></p>
  <pre><code>{
    &quot;private&quot;: true,
    &quot;scripts&quot;: {
      &quot;dev&quot;: &quot;npm run development&quot;,
      &quot;development&quot;: &quot;cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js&quot;,
      &quot;watch&quot;: &quot;npm run development -- --watch&quot;,
      &quot;watch-poll&quot;: &quot;npm run watch -- --watch-poll&quot;,
      &quot;hot&quot;: &quot;cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js&quot;,
      &quot;prod&quot;: &quot;npm run production&quot;,
      &quot;production&quot;: &quot;cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;axios&quot;: &quot;^0.19&quot;,
      &quot;cross-env&quot;: &quot;^7.0&quot;,
      &quot;laravel-mix&quot;: &quot;^5.0.1&quot;,
      &quot;lodash&quot;: &quot;^4.17.19&quot;,
      &quot;postcss&quot;: &quot;8.1&quot;,
      &quot;resolve-url-loader&quot;: &quot;^3.1.0&quot;,
      &quot;sass&quot;: &quot;^1.15.2&quot;,
      &quot;sass-loader&quot;: &quot;^8.0.0&quot;,
      &quot;vue-template-compiler&quot;: &quot;^2.6.12&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@glidejs/glide&quot;: &quot;^3.4.1&quot;,
      &quot;bootstrap&quot;: &quot;^4.3.1&quot;,
      &quot;bootstrap.native&quot;: &quot;^3.0.14&quot;,
      &quot;diff-match-patch&quot;: &quot;^1.0.5&quot;,
      &quot;node-sass&quot;: &quot;^4.14.1&quot;,
      &quot;popper.js&quot;: &quot;^1.16.1&quot;
    }
  }
  </code></pre>
  <p><strong>My command-line</strong></p>
  <p>C:\xampp734\templatedocs&gt;npm run dev</p>
  <blockquote>
  <p>dev
  npm run development</p>
  </blockquote>
  <blockquote>
  <p>development
  cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js</p>
  </blockquote>
  <p>98% after emitting SizeLimitsPlugin</p>
  <p>DONE  Compiled successfully in 53404ms                                                                                                                                                                               9:24:47 PM</p>
  <p>(node:4412) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'C:\public\css\site.css'
  at Object.openSync (fs.js:476:3)
  at Object.readFileSync (fs.js:377:35)
  at File.read (C:\xampp734\templatedocs\node_modules\laravel-mix\src\File.js:166:19)
  at File.version (C:\xampp734\templatedocs\node_modules\laravel-mix\src\File.js:173:25)
  at Manifest.hash (C:\xampp734\templatedocs\node_modules\laravel-mix\src\Manifest.js:52:65)
  at C:\xampp734\templatedocs\node_modules\laravel-mix\src\webpackPlugins\CustomTasksPlugin.js:96:26
  at Collection.each (C:\xampp734\templatedocs\node_modules\collect.js\dist\methods\each.js:21:14)
  at CustomTasksPlugin.applyVersioning (C:\xampp734\templatedocs\node_modules\laravel-mix\src\webpackPlugins\CustomTasksPlugin.js:95:37)
  at C:\xampp734\templatedocs\node_modules\laravel-mix\src\webpackPlugins\CustomTasksPlugin.js:16:30
  at runMicrotasks ()
  at processTicksAndRejections (internal/process/task_queues.js:93:5)
  (Use <code>node --trace-warnings ...</code> to show where the warning was created)
  (node:4412) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag <code>--unhandled-rejections=strict</code> (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7)</p>