EPERM: operation not permitted, scandir

See original GitHub issue

Hi,

Trying to run a Node app in a Docker image based on mhart/alpine-node:6.4.0, I get the following stack trace which points to Glob:

/node_modules/webdriverio/build/lib/cli.js:369
            throw e;
            ^

Error: EPERM: operation not permitted, scandir '/proc/1/map_files/561b222d4000-561b23a8b000'
    at Error (native)
    at Object.fs.readdirSync (fs.js:951:18)
    at GlobSync._readdir (/node_modules/glob/sync.js:276:41)
    at GlobSync._readdirInGlobStar (/node_modules/glob/sync.js:255:20)
    at GlobSync._readdir (/node_modules/glob/sync.js:264:17)
    at GlobSync._processReaddir (/node_modules/glob/sync.js:136:22)
    at GlobSync._process (/node_modules/glob/sync.js:131:10)
    at GlobSync._processGlobStar (/node_modules/glob/sync.js:368:10)
    at GlobSync._process (/node_modules/glob/sync.js:129:10)
    at GlobSync._processGlobStar (/node_modules/glob/sync.js:371:10)

Is this a bug, and/or is there any known workaround? It occurs also when run as root. Thanks!

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:12
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Jul 11, 2017

Is there a “continue on error”? strict: false worked for me.

1reaction
spemmonscommented, Apr 27, 2017

i created a fork and modified the sync.js to treat EPERM errors the same as ENOENT and was able to continue successfully… this would seem to be the same situation (in my case) a trying to do a recursive list of files where you don’t have permission for some nested subdirectories… perhaps one could argue that handling for this could be based on an option, but i’m not sure that’s really necessary… is this an active project that i could submit a pull request to? it unfortunately looks pretty stale…

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm ERR! EPERM : operation not permitted , scandir
I think the issue is another process is utilizing that folder so it's locked down, perhaps from a previous build. I would try...
Read more >
Error: EPERM: operation not permitted, scandir #17747 - GitHub
I'm opening this issue because: npm is crashing. npm is producing an incorrect install. npm is doing something I don't understand.
Read more >
How to fix this: EPERM: operation not permitted, scandir
Chosen solution. Hello acac12,. Maybe you could check to see if you have granted permission to access certain folders :.
Read more >
There was an error: EPERM: operation not permitted, scandir ...
That error is saying that n8n doesn't have permission to access that directory, More information is needed like what are you doing, what...
Read more >
EPERM on Trash directory - Developer Support
... run plasmic sync on my mac and keep running into this error: "EPERM: operation not permitted, scandir '/Users/nivethanarayanan/.Trash'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found