Watchpack Errors

I’m wondering how to get rid of these Watchpack errors when running codegen locally npm run dev:

```

Watchpack Error (initial scan): Error: EINVAL: invalid argument, lstat ‘C:\DumpStack.log.tmp’
Watchpack Error (initial scan): Error: EINVAL: invalid argument, lstat ‘C:\hiberfil.sys’
Watchpack Error (initial scan): Error: EINVAL: invalid argument, lstat ‘C:\pagefile.sys’
Watchpack Error (initial scan): Error: EINVAL: invalid argument, lstat ‘C:\swapfile.sys’
Watchpack Error (initial scan): Error: EINVAL: invalid argument, lstat ‘C:\DumpStack.log.tmp’
Watchpack Error (initial scan): Error: EINVAL: invalid argument, lstat ‘C:\pagefile.sys’
Watchpack Error (initial scan): Error: EINVAL: invalid argument, lstat ‘C:\swapfile.sys’
Watchpack Error (initial scan): Error: EINVAL: invalid argument, lstat ‘C:\hiberfil.sys’
```

They happen once, usually. Any ideas?

@EmCmNeDt I haven’t seen this reported before, but watchpack is used by Next.js to check for filesystem updates.

It might be a Next bug, though it may be possible to ignore via webpack (or Vite) config, depending on how your project is set up. It would be something like:

watchOptions: {
  ignored: /DumpStack\.log\.tmp/
}

Another option could be upgrading your Next.js version, if that is possible for your project.