Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/...' #187

@Philipp91

Description

@Philipp91

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, 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions