Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected watchpack error about /mnt/c/pagefile.sys #3374

Open
CherryDT opened this issue Sep 28, 2023 · 0 comments
Open

Unexpected watchpack error about /mnt/c/pagefile.sys #3374

CherryDT opened this issue Sep 28, 2023 · 0 comments

Comments

@CherryDT
Copy link

  • Laravel Mix Version: 6.0.49
  • Node Version (node -v): 16.14.0
  • NPM Version (npm -v): 6.14.15 (old, I know - I have a technical reason for this, but I don't see how it would impact this issue)
  • OS: Ubuntu 20.04 on WSL1 on Windows 10 22H2

Description:

When I start mix watch, I get an unexpected error message in the console even though everything works otherwise:

Watchpack Error (stats): Error: EACCES: permission denied, lstat '/mnt/c/pagefile.sys'

This is unexpected because I don't understand why it would even care about files far outside of the project directory, such as the Windows pagefile...

My webpack.mix.js looks like this:

const mix = require('laravel-mix')
require('laravel-mix-svelte')
const path = require('path')

mix.babelConfig({
  sourceType: 'unambiguous'
})

mix
  .webpackConfig({
    resolve: {
      alias: {
        '@assets': path.resolve(__dirname, 'resources/assets'),
        svelte: path.resolve('node_modules', 'svelte')
      },
      extensions: ['.js', '.mjs', '.svelte'],
      conditionNames: ['svelte', 'browser', 'import']
    }
  })
  .copy('resources/assets/img', 'public/img')
  .copy('resources/assets/sounds', 'public/sounds')
  .copy('node_modules/font-awesome/fonts', 'public/fonts')
  .copy('resources/assets/robots.txt', 'public/robots.txt')
  .setPublicPath('public')
  .sass('resources/assets/sass/app.scss', 'css')
  .js('resources/assets/js/app.js', 'js')
  .svelte({compilerOptions: {customElement: false}})
  .sourceMaps()
  .version()

Steps To Reproduce:

Set up Mix with same settings and run mix watch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant