Gatsby: Error EPERM for mkdir .cache after reruning `gatsby develop`

Created on 9 Jul 2020  ·  13Comments  ·  Source: gatsbyjs/gatsby

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(R) Core(TM) 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

stale? inkteam assigned bug

Most helpful comment

Restarting always works.. that's a stupid fix though

On Thu, Nov 26, 2020, 9:25 AM Shine Santhosh notifications@github.com
wrote:

An ide restart fixes the issue for me.

Is the .cache folder created normally otherwise? Or does creating folders
always fail?

It creates the cache without any issue


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/gatsbyjs/gatsby/issues/25658#issuecomment-734149622,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH3QHHWEOD7OA3CGNQPODW3SRYGFZANCNFSM4OV5ZM5A
.

All 13 comments

Updated!

  • The problem occurs again after 15 minutes later. I don't know why.

I have exactly the same problem on Windows 10 after I run yarn clean, gatsby clean.

I did the following:

  • Right click on project folder, select "Properties" => "Security".
  • Click "Edit" button on the right hand of "To change permissions, click Edit".
  • Allow "Full control" for all Users and Groups.

It works for me, not sure if it effects something or not. But at least, I can run gatsby develop now. Hope this helps @hayk94

Yeah, unfortunately it won’t work on corporate laptops.

On Wed, Jul 22, 2020 at 4:58 PM shinaBR2 notifications@github.com wrote:

I have exactly the same problem on Windows 10 after I run yarn clean, gatsby
clean.

I did the following:

  • Right click on project folder, select "Properties" => "Security".
  • Click "Edit" button on the right hand of "To change permissions,
    click Edit".
  • Allow "Full control" for all Users and Groups.

It works for me, not sure if it effects something or not. But at least, I
can run gatsby develop now. Hope this helps @hayk94
https://github.com/hayk94


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/gatsbyjs/gatsby/issues/25658#issuecomment-662437488,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACKY3X3HZK67UA4UKPZNXO3R43O7VANCNFSM4OV5ZM5A
.

Yeah so bad. I copy everything in my project folder into another one, remove and create new folder, and it works like a charm.

I'm also having the same issue after I did the update🤦‍♂️. I tried giving access to every user 😅. It works for a single time. And then I have to restart the ide to run it again

Hi guys any solution?

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

Hey again!

It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 💪💜

how tf does this remain unattended to??

Nobody notices this. Since gatsby-node.js need to be configured only once (in most cases), I just ignored the issue as there's no fix for it😅

Is the .cache folder created normally otherwise? Or does creating folders always fail?

An ide restart fixes the issue for me.

Is the .cache folder created normally otherwise? Or does creating folders always fail?

It creates the cache without any issue

Restarting always works.. that's a stupid fix though

On Thu, Nov 26, 2020, 9:25 AM Shine Santhosh notifications@github.com
wrote:

An ide restart fixes the issue for me.

Is the .cache folder created normally otherwise? Or does creating folders
always fail?

It creates the cache without any issue


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/gatsbyjs/gatsby/issues/25658#issuecomment-734149622,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH3QHHWEOD7OA3CGNQPODW3SRYGFZANCNFSM4OV5ZM5A
.

Just adding my laments.

Was this page helpful?
0 / 5 - 0 ratings