Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yarn install: EACCES: permission denied, unlink yarn integrity

yarn install throws:

EACCES: permission denied, unlink '/home/minnak/Darbas/market/node_modules/.yarn-integrity'

Might be related to this issue

I tried checking for permissions:

ls -la /home/minnak/Darbas/market/node_modules/.yarn*

Output: -rw-r--r-- 1 root root 490276 kov. 13 15:10 /home/minnak/Darbas/market/node_modules/.yarn-integrity

and then:

sudo chown -R minnak /home/minnak/.config/yarn/

Then launch yarn install again and get the same error.

like image 736
Mindaugas Avatar asked Mar 14 '19 07:03

Mindaugas


2 Answers

Try running sudo rm -rf /home/minnak/Darbas/market/node_modules/ and then yarn without elevated permissions.

like image 106
Matas Avatar answered Sep 18 '22 21:09

Matas


It's likely a unix permission related problem. There is a solution posted on the dev's github page. Try to run the following command

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config

Reference: EACCES: permission denied .config/configstore/bower-github.json #2262

like image 20
Muhammad Numan Avatar answered Sep 19 '22 21:09

Muhammad Numan