gatsby: Error EPERM for mkdir .cache after reruning `gatsby develop`
Description
Getting error EPERM , every time I make a change to gatsby-node.js
file and re-run gatsby-develop
Tried clearing the cache, but the only workaround for this at the moment is to restart whole windows.
C:\Users\Hayk_Safaryan\projects\egghead\my-blog>gatsby develop
success open and validate gatsby-configs - 0.038s
success load plugins - 0.550s
success onPreInit - 0.008s
ERROR
Missing onError handler for invocation 'initialize', error was 'Error: EPERM: operation not permitted, mkdir 'C:\Users\Hayk_Safaryan\projects\egghead\my-blog\.cache''. Stacktrace was 'Error: EPERM: operation not permitted, mkdir 'C:\Users\Hayk_Safaryan\projects\egghead\my-blog\.cache''
⠇ initialize cache
Steps to reproduce
https://github.com/hayk94/my-blog
gatsby develop
make change to gatsby-node.js
file
rerun gatsby develop
Expected result
local dev server should start
Actual result
getting the error described above.
Environment
$ gatsby info --clipboard
System: OS: Windows 10 10.0.18362 CPU: (8) x64 Intel® Core™ i7-8650U CPU @ 1.90GHz Binaries: Node: 12.13.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.12.1 - C:\Program Files\nodejs\npm.CMD Languages: Python: 2.7.17 - /c/Python27/python Browsers: Edge: 44.18362.449.0 npmPackages: gatsby: ^2.23.12 => 2.23.21 gatsby-source-filesystem: ^2.3.18 => 2.3.18 gatsby-transformer-remark: ^2.8.23 => 2.8.23
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 20 (1 by maintainers)
I was getting this error when I tried to use gatsby-source-contentful with downloadLocal: true. The problem is caused because of the gatsby-source-fileystem’s number of concurrent download limit and timeout. The solution is to reduce number of concurrent download. Add following line to gatsby-config.js and this may solve your issue in this case.
process.env.GATSBY_CONCURRENT_DOWNLOAD = 1;
Just adding my laments.
Restarting always works… that’s a stupid fix though
On Thu, Nov 26, 2020, 9:25 AM Shine Santhosh notifications@github.com wrote: