Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/...'
envgap__webpack__watchpack-187
01 / FAILURE SIGNATURE
As reported upstream
Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/DumpStack.log.tmp'
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
4917313916db904459ebbf5533c4ab17d57efe38- Manifest
package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
webpack/watchpack #187 · read the original issue
I run `webpack --watch --watch-options-stdin ...` and amidst its _initial_ build (not the subsequent builds triggered by changed files), it prints: ``` Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/DumpStack.log.tmp' Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/hiberfil.sys' Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/pagefile.sys' Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/swapfile.sys' ``` Someone already reported the problem [here](https://github.com/webpack/webpack-dev-server/issues/2809#issue-733791099), so I'll refer to those details for reproduction. Key elements are webpack v5 and WSL1 under Windows. The directory `/mnt/c` maps to the Windows root drive `C:\`, which contains these special files like the swapfile, to which the user doesn't have access. That is, the command `ls /mnt/c` fails on the command line too. So it's not surprising that it fails for watchpack too. What _is_ surprising (to me) is that watchpack attempts to list that directory to begin with. I have no config telling webpack/watchpack what to watch, only that `--watch` flag. Can someone explain this to me?
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]