2

I am using Gatsby for the first time and I cannot figure out this error. I have done tons of googling and nothing seems to work.

warn Error persisting state: EACCES: permission denied, rename '/mnt/d/projects/gatsby-starter-hello-world/.cache/redux' ->

I have reinstalled node, and gatsby cli and this

Jkaram
  • 611
  • 2
  • 7
  • 13

3 Answers3

0

A bit late to the party but taken from the Github:

I'd opened VS Code from WSL which appears to lock some folders. By closing VS Code and then running gatsby build I was able to get everything working without having to downgrade or clear any folders.

So closing VSCode and running the gatsby command fixed the problem for me.

Alex R.
  • 459
  • 5
  • 16
0

Even later to the party.

Running gatsby clean and/or closing VS Code did not solve it for me.

What did, was to manually delete the .cache folder in the gatsby project, then run gatsby develop again.

allegutta
  • 5,626
  • 10
  • 38
  • 56
0

Not sure if you are in admin mode.

Another way to solve that issue is to use sudo command and set the full permission for the project folder.

For instance, sudo chmod -R 777 gatsby-starter-hello-world/

Or direct use the commands whatever you want to apply for. sudo npm install

References: https://www.pluralsight.com/blog/it-ops/linux-file-permissions#:~:text=To%20change%20directory%20permissions%20for,only%20read%20permission%20for%20everyone.

https://www.cyberithub.com/best-ways-to-become-root-user-superuser-in-linux-rhel-centos-ubuntu/

hotcakedev
  • 2,194
  • 1
  • 25
  • 47