4

I have a workspace setup and ever sense I keep getting permission issues with yarn:

error An unexpected error occurred: "EACCES: permission denied, mkdir '/home/code/client/node_modules/cacache/node_modules/mkdirp'".

The only solution I have is to delete node_modules on all packages which are part of my workspace, which gets annoying.

Then I run yarn install again and everything is fine. Next day I'll come back and face the same issue.

I also have to use sudo to delete node_modules which is strange.

RobC
  • 22,977
  • 20
  • 73
  • 80
Batman
  • 5,563
  • 18
  • 79
  • 155
  • Take look here ;-) => https://stackoverflow.com/questions/48910876/error-eacces-permission-denied-access-usr-local-lib-node-modules?answertab=active#tab-top – MarioG8 Oct 28 '21 at 08:39

1 Answers1

0

You can set permission by

sudo chown -R $USER:$GROUP node_modules

or

sudo chmod -R u+w /your/project/directory

or

sudo chmod -R 777 /your/project/directory
Jaber Al Nahian
  • 903
  • 10
  • 15