-1

I'm new to Gatsby, I find that every time I need to compile, for some reason I had to cancel the current compilation, I always get an error:

Failed to remove .cache files. EPERM: operation not permitted, unlink 'C:\madvikinggames\gatsby\gatsby-styled-components\gatsby-starter-styled-components\.cache\_this_is_virtual_fs_path_\$virtual'

And all I have to do is to kill that terminal, leave VS Code, re-enter VS Code, open a new terminal, and npm run start again

Some other times the error is related to copying some files

It seems to be some kind of permission I have to give VS Code, but I don't know what

Rafael
  • 2,413
  • 4
  • 32
  • 54

1 Answers1

0

It seems that the VS Code terminal doesn't have enough permissions to remove the .cache and the /public folder, something that you should have in the develop command along with other actions that you are not allowed to perform.

Try opening the VS Code with administrator rights: Visual studio code terminal, how to run a command with administrator rights?

Ferran Buireu
  • 28,630
  • 6
  • 39
  • 67