gatsby-source-strapi
gatsby-source-strapi copied to clipboard
EPERM /gatsby-source-filesystem issue on Windows 10
Hey guys, thanks for the plugin. I have run into an issue that I can't seem to resolve. I have narrowed it down to something with how this plugin works with the gatsby-source-filesystem and if I try to query images from Strapi.
Whenever I run 'gatsby develop' everything compiles fine and runs for probably 5-10 seconds then crashes with the following error:
Error: EPERM: operation not permitted, lstat 'C:\Users\steve\Development\GitHub\project.cache\gatsby-source-filesystem\tmp-d3b56b8057af32564415970b4fa22b46.png'
I have tried manually changing the permissions to that directory using a variety of methods and nothing fixes it... it will always go back anyways since it is regenerated in the cache folder. I also have disabled all anti-virus/firewalls to make sure, as well.
Note that this doesn't happen when I 'gatsby build' and then 'gatsby serve' or deploy the site - all is fine then. Only happens in develop.
I am calling images in my graphql - which I believe is the issue, as well:
allStrapiNews(sort: {fields: [date], order: DESC}) { edges { node { id image { url } ...
I have:
Node.js - 10.14.1 yarn - 1.13.0 Gatsby - 2.2.0 Gatsby CLI - 2.4.16 Strapi - 3.0.0-alpha.25.2
I'll be happy to provide more information if needed. Any help would be greatly appreciated!!
Thanks, Steve
Yeah I have the same issue. I have found out that removing the .cache folder and the public folder fixes it. I think the cache is the problem as some files are cached by your browser. I am not sure about that, though.
this is a reall issue and seems happens from time to time!
This sometimes occurs if you are adding and deleting images. At the moment, deleting the gatsby cache has been the only way to solve this and continue. (At the moment these changes sometimes do not invalidate the gatsby cache.)
Please note, that Strapi on Windows is best done running in the Windows Subsystem for Linux.
Having similar issue here,
I just added the plugin, and ran gatsby develop, then this happens

I tried clearing cache with gatsby clean but doesn't help. So I am stuck...
Any ideas how to solve this?
I no longer get this error, so not sure if a recent update of this module or the strapi one I used, however - for those that continue to get it AND use gatsby-source-strapi.
Edit the below file:
/node_modules/gatsby-source-strapi/ normalize.js Comment out Line 121
Or look for the line that is: cache: cache
and comment it out.
I'm getting this issue and gatsby clean does not fix the issue..
The issue has come out of nowhere, unless gatsby can fix these silly issues that continue to popup, I can't commit my agency to use the stack
We're also experiencing this issue on Windows 10 when sourcing remote images using createRemoteFileNode(). I've tried running 'gatsby clean' and this makes no difference. Have also tried closing visual studio code and running the command prompt as administrator.
We're also experiencing this issue on Windows 10 when sourcing remote images using createRemoteFileNode(). I've tried running 'gatsby clean' and this makes no difference. Have also tried closing visual studio code and running the command prompt as administrator.
Did you anyhow get the solution for this? I'm on Windows 10 and literally tried everything like deleting .cache and public folders, reinstalling all packages but this issue continues to popup.
This issue is still happening. I have removed my whole project and again cloned from github and install all the node modules. Also gave the all permissions for folders and subfolders. Tried gatsby clean and reinstalling node_modules as well.
Did anyone find any solution for this😥?
This issue is happening for me too, like everyone else- on Windows 10, tried gatsby-clean, tried reinstalling node_modules, no luck- please send help.
I ended up installing WSL (windows subsystem for linux). Using WSL you can run linux in windows without installing separate OS. You have to install nodeJS into the WSL. I have cloned repo in linux and now it's working without any issue.
I think this issue happening only in windows. Still if you face this issue in any other OS then you can try to tweak these variables https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-filesystem#troubleshooting
I tried deleting the .cache and public folders and ran gatsby clean , after that I did gatsby build and then gatsby develop which fixed my issue
Thanks for your interest in this project. This plugin is moving into the Gatsby User Collective and this repo will be archived. Please open an issue in that repository, submit a PR if you'd like to see this implemented, or join us on Discord if you have questions!