Gatsby: Error: EPERM: operation not permitted, lstat (gatsby-starter-default + gatsby-source-wordpress)

Created on 3 Aug 2019  路  3Comments  路  Source: gatsbyjs/gatsby

Description

I installed the default starter and the wordpress plugin. Running develop compiles successfully. But, a few seconds later an error is thrown.

Steps to reproduce

  • Install gatsby-starter-default
  • Install gatsby-source-wordpress
  • Run gatsby develop
  • Open the site in a browser (I'm using Chrome)

Expected result

  • The page should load properly

Actual result

  • The browser error: "This site can鈥檛 be reached. localhost refused to connect."
  • The server has now stopped, and the error in the terminal is:
    ````
    5 pages gatsby-starter-default

C:UsersUsernameAppDataLocalYarnconfigglobalnode_modulesyoga-layout-prebuiltyoga-layoutbuildReleasenbind.js:53
throw ex;
^

Error: EPERM: operation not permitted, lstat 'C:htdocssandboxesgatsby-project.cachegatsby-source-filesystemtmp-d95d3893f542f53189a060463b734974.jpg'
at Object.lstatSync (fs.js:845:3)
at Object.lstatSync (C:htdocssandboxesgatsby-projectnode_modulesgraceful-fspolyfills.js:302:16)
at Object.rimrafSync [as removeSync] (C:htdocssandboxesgatsby-projectnode_modulesfs-extralibremoverimraf.js:237:18)
at DuplexWrapper.responseStream.on (C:htdocssandboxesgatsby-projectnode_modulesgatsby-source-wordpressnode_modulesgatsby-source-filesystemcreate-remote-file-node.js:162:8)
at DuplexWrapper.emit (events.js:198:13)
at Timeout.setTimeout [as _onTimeout] (C:htdocssandboxesgatsby-projectnode_modulesgotindex.js:205:10)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
````

Environment

System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Binaries:
    Yarn: 1.3.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.10.2 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 3.6.2 - C:\Users\Michael\AppData\Local\Programs\Python\Python36\python.EXE
  Browsers:
    Edge: 38.14393.1066.0
  npmPackages:
    gatsby: ^2.13.45 => 2.13.45
    gatsby-image: ^2.2.7 => 2.2.7
    gatsby-plugin-manifest: ^2.2.4 => 2.2.4
    gatsby-plugin-offline: ^2.2.4 => 2.2.4
    gatsby-plugin-react-helmet: ^3.1.2 => 3.1.2
    gatsby-plugin-sharp: ^2.2.9 => 2.2.9
    gatsby-source-filesystem: ^2.1.7 => 2.1.7
    gatsby-source-wordpress: ^3.1.13 => 3.1.13
    gatsby-transformer-sharp: ^2.2.5 => 2.2.5

Additional info

Also, I notice that immediately after it says that it compiled successfully, I can see image files in the .cache/gatsby-source-filesystem directory. But, a few moments later, when the error above occurs and the server is stopped, all the files disappear. (Perhaps it's normal to remove the files when the server stops, but I thought I'd mention that here, just in case it's not.)

Also, if I comment out the media path in gatsby-config for the wordpress plugin configuration section, then I get no errors:

              includedRoutes: [
                  "**/categories",
                  "**/posts",
                  "**/pages",
                  // "**/media",
                  "**/menus",
                  "**/tags",
                  "**/taxonomies",
                  "**/users",
              ],

Most helpful comment

Happened to me while my VScode was Open so i closed it and used to run gatsby develop on cmd and it worked .

All 3 comments

Hi @mavalon!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it. I can't seem to reproduce this on my own.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.

Thanks for using Gatsby! 馃挏

I ended up switching to gatsby-source-graphql (instead of using gatsby-source-wordpress) to avoid the many issues I was having.

Happened to me while my VScode was Open so i closed it and used to run gatsby develop on cmd and it worked .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dustinhorton picture dustinhorton  路  3Comments

andykais picture andykais  路  3Comments

benstr picture benstr  路  3Comments

magicly picture magicly  路  3Comments

mikestopcontinues picture mikestopcontinues  路  3Comments